static uint8_t *ss7_extract_payload(msg_t *msg, size_t *len, int *opc, int *dpc, int *type) { switch (msg->sctp_ppid) { case SCTP_M2UA_PPID: msg->rcinfo.proto_type = 0x08; return extract_from_mtp(extract_from_m2ua(msg, len), len, opc, dpc, type); break; case SCTP_M2PA_PPID: msg->rcinfo.proto_type = 0x0d; return extract_from_mtp(extract_from_m2pa(msg, len), len, opc, dpc, type); default: LDEBUG("SS7 SCTP PPID(%u) not known", msg->sctp_ppid); return NULL; } }
static const uint8_t *ss7_extract_payload(const uint8_t *data, size_t *len, int proto, int *opc, int *dpc, int *mtp_type) { switch (proto) { case HEP_M2UA: return extract_from_mtp(extract_from_m2ua(data, len), len, opc, dpc, mtp_type); break; case HEP_M2PA: return extract_from_mtp(extract_from_m2pa(data, len), len, opc, dpc, mtp_type); default: LM_ERR("Unknown HEP type %d/0x%c\n", proto, proto); return NULL; } }