GSM_Types: Fix MobileIdentity

This commit is contained in:
Harald Welte 2017-07-30 00:49:04 +02:00
parent d1209a6f04
commit bda65a31f5
1 changed files with 12 additions and 8 deletions

View File

@ -176,30 +176,34 @@ module GSM_Types {
MobileIdentityType mi_type (MI_TYPE_IMSI, MI_TYPE_IMEI, MI_TYPE_IMEISV), MobileIdentityType mi_type (MI_TYPE_IMSI, MI_TYPE_IMEI, MI_TYPE_IMEISV),
boolean odd, boolean odd,
hexstring digits hexstring digits
} with { variant "" }; } with { variant "FIELDORDER(lsb)" };
type record MobileIdentityTMSI { type record MobileIdentityTMSI {
BIT4 pad ('1111'B), BIT4 pad ('1111'B),
boolean odd (false), boolean odd (false),
MobileIdentityType mi_type (MI_TYPE_TMSI), MobileIdentityType mi_type (MI_TYPE_TMSI),
GsmTmsi tmsi GsmTmsi tmsi
} with { variant "" }; } with { variant "FIELDORDER(lsb)" };
type record MobileIdentityNone { type record MobileIdentityNone {
BIT4 pad ('1111'B), BIT4 pad ('1111'B),
boolean odd (false), boolean odd (false),
MobileIdentityType mi_type (MI_TYPE_NONE) MobileIdentityType mi_type (MI_TYPE_NONE)
} with { variant "" }; } with { variant "FIELDORDER(lsb)" };
type union MobileIdentity { type union MobileIdentity {
MobileIdentityBCD bcd, MobileIdentityBCD imsi,
MobileIdentityBCD imei,
MobileIdentityBCD imeisv,
MobileIdentityTMSI tmsi, MobileIdentityTMSI tmsi,
MobileIdentityNone unused MobileIdentityNone unused
} with { variant "TAG(bcd, mi_type = MI_TYPE_IMSI; } with { variant "TAG(imsi, mi_type = MI_TYPE_IMSI;
bcd, mi_type = MI_TYPE_IMEI; imei, mi_type = MI_TYPE_IMEI;
bcd, mi_type = MI_TYPE_IMEISV; imeisv, mi_type = MI_TYPE_IMEISV;
tmsi, mi_type = MI_TYPE_TMSI; tmsi, mi_type = MI_TYPE_TMSI;
unused, mi_type = MI_TYPE_NONE)" }; unused, mi_type = MI_TYPE_NONE)"
variant "FIELDORDER(lsb)"
};
type record MobileIdentityLV { type record MobileIdentityLV {
uint8_t len, uint8_t len,