add iu_common.h using C structs to describe PER encoded Iu headers

This commit is contained in:
Harald Welte 2015-08-30 16:55:43 +02:00
parent b866659991
commit c3fa0b0e43
1 changed files with 23 additions and 0 deletions

23
src/iu_common.h Normal file
View File

@ -0,0 +1,23 @@
#pragma once
/* A humble attempt of reading the Iu messages (RUA/RANAP/HNBAP) without an asn.1 parser.
* Not actually used anywhere (yet?) */
struct iu_common_hdr {
uint8_t msg_type;
uint8_t procedure_code;
uint8_t criticality;
uint8_t len; /* first byte of length field */
uint8_t payload[0]; /* possible further length field + payload */
/* extension? */
/* ? */
/* number of ProtocolIEs */
} __attribute__ ((packed));
struct iu_common_ie {
uint16_t iei;
uint8_t criticality;
uint8_t len; /* first byte of length field */
uint8_t payload[0]; /* possible further length field + payload */
} __attribute__ ((packed));