repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
listlengths
20
707
docstring
stringlengths
3
17.3k
docstring_tokens
listlengths
3
222
sha
stringlengths
40
40
url
stringlengths
87
242
partition
stringclasses
1 value
idx
int64
0
252k
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType7
def systemInformationType7(): """SYSTEM INFORMATION TYPE 7 Section 9.1.41""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x37) # 000110111 d = Si7RestOctets() packet = a / b / c / d return packet
python
def systemInformationType7(): """SYSTEM INFORMATION TYPE 7 Section 9.1.41""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x37) # 000110111 d = Si7RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType7", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x01", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x37", ")", "# 000110111", "d", "=", "Si7RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 7 Section 9.1.41
[ "SYSTEM", "INFORMATION", "TYPE", "7", "Section", "9", ".", "1", ".", "41" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1133-L1140
train
237,200
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType8
def systemInformationType8(): """SYSTEM INFORMATION TYPE 8 Section 9.1.42""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x18) # 00011000 d = Si8RestOctets() packet = a / b / c / d return packet
python
def systemInformationType8(): """SYSTEM INFORMATION TYPE 8 Section 9.1.42""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x18) # 00011000 d = Si8RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType8", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x01", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x18", ")", "# 00011000", "d", "=", "Si8RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 8 Section 9.1.42
[ "SYSTEM", "INFORMATION", "TYPE", "8", "Section", "9", ".", "1", ".", "42" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1145-L1152
train
237,201
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType9
def systemInformationType9(): """SYSTEM INFORMATION TYPE 9 Section 9.1.43""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x4) # 00000100 d = Si9RestOctets() packet = a / b / c / d return packet
python
def systemInformationType9(): """SYSTEM INFORMATION TYPE 9 Section 9.1.43""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x4) # 00000100 d = Si9RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType9", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x01", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x4", ")", "# 00000100", "d", "=", "Si9RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 9 Section 9.1.43
[ "SYSTEM", "INFORMATION", "TYPE", "9", "Section", "9", ".", "1", ".", "43" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1157-L1164
train
237,202
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType13
def systemInformationType13(): """SYSTEM INFORMATION TYPE 13 Section 9.1.43a""" a = L2PseudoLength(l2pLength=0x00) b = TpPd(pd=0x6) c = MessageType(mesType=0x0) # 00000000 d = Si13RestOctets() packet = a / b / c / d return packet
python
def systemInformationType13(): """SYSTEM INFORMATION TYPE 13 Section 9.1.43a""" a = L2PseudoLength(l2pLength=0x00) b = TpPd(pd=0x6) c = MessageType(mesType=0x0) # 00000000 d = Si13RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType13", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x00", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x0", ")", "# 00000000", "d", "=", "Si13RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 13 Section 9.1.43a
[ "SYSTEM", "INFORMATION", "TYPE", "13", "Section", "9", ".", "1", ".", "43a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1169-L1176
train
237,203
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType16
def systemInformationType16(): """SYSTEM INFORMATION TYPE 16 Section 9.1.43d""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x3d) # 00111101 d = Si16RestOctets() packet = a / b / c / d return packet
python
def systemInformationType16(): """SYSTEM INFORMATION TYPE 16 Section 9.1.43d""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x3d) # 00111101 d = Si16RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType16", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x01", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x3d", ")", "# 00111101", "d", "=", "Si16RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 16 Section 9.1.43d
[ "SYSTEM", "INFORMATION", "TYPE", "16", "Section", "9", ".", "1", ".", "43d" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1184-L1191
train
237,204
phaethon/kamene
kamene/contrib/gsm_um.py
systemInformationType17
def systemInformationType17(): """SYSTEM INFORMATION TYPE 17 Section 9.1.43e""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x3e) # 00111110 d = Si17RestOctets() packet = a / b / c / d return packet
python
def systemInformationType17(): """SYSTEM INFORMATION TYPE 17 Section 9.1.43e""" a = L2PseudoLength(l2pLength=0x01) b = TpPd(pd=0x6) c = MessageType(mesType=0x3e) # 00111110 d = Si17RestOctets() packet = a / b / c / d return packet
[ "def", "systemInformationType17", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x01", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x3e", ")", "# 00111110", "d", "=", "Si17RestOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
SYSTEM INFORMATION TYPE 17 Section 9.1.43e
[ "SYSTEM", "INFORMATION", "TYPE", "17", "Section", "9", ".", "1", ".", "43e" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1196-L1203
train
237,205
phaethon/kamene
kamene/contrib/gsm_um.py
talkerIndication
def talkerIndication(): """TALKER INDICATION Section 9.1.44""" a = TpPd(pd=0x6) b = MessageType(mesType=0x11) # 00010001 c = MobileStationClassmark2() d = MobileId() packet = a / b / c / d return packet
python
def talkerIndication(): """TALKER INDICATION Section 9.1.44""" a = TpPd(pd=0x6) b = MessageType(mesType=0x11) # 00010001 c = MobileStationClassmark2() d = MobileId() packet = a / b / c / d return packet
[ "def", "talkerIndication", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x6", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x11", ")", "# 00010001", "c", "=", "MobileStationClassmark2", "(", ")", "d", "=", "MobileId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
TALKER INDICATION Section 9.1.44
[ "TALKER", "INDICATION", "Section", "9", ".", "1", ".", "44" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1206-L1213
train
237,206
phaethon/kamene
kamene/contrib/gsm_um.py
uplinkBusy
def uplinkBusy(): """UPLINK BUSY Section 9.1.46""" name = "Uplink Busy" a = TpPd(pd=0x6) b = MessageType(mesType=0x2a) # 00101010 packet = a / b return packet
python
def uplinkBusy(): """UPLINK BUSY Section 9.1.46""" name = "Uplink Busy" a = TpPd(pd=0x6) b = MessageType(mesType=0x2a) # 00101010 packet = a / b return packet
[ "def", "uplinkBusy", "(", ")", ":", "name", "=", "\"Uplink Busy\"", "a", "=", "TpPd", "(", "pd", "=", "0x6", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2a", ")", "# 00101010", "packet", "=", "a", "/", "b", "return", "packet" ]
UPLINK BUSY Section 9.1.46
[ "UPLINK", "BUSY", "Section", "9", ".", "1", ".", "46" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1225-L1231
train
237,207
phaethon/kamene
kamene/contrib/gsm_um.py
vgcsUplinkGrant
def vgcsUplinkGrant(): """VGCS UPLINK GRANT Section 9.1.49""" a = TpPd(pd=0x6) b = MessageType(mesType=0x9) # 00001001 c = RrCause() d = RequestReference() e = TimingAdvance() packet = a / b / c / d / e return packet
python
def vgcsUplinkGrant(): """VGCS UPLINK GRANT Section 9.1.49""" a = TpPd(pd=0x6) b = MessageType(mesType=0x9) # 00001001 c = RrCause() d = RequestReference() e = TimingAdvance() packet = a / b / c / d / e return packet
[ "def", "vgcsUplinkGrant", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x6", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x9", ")", "# 00001001", "c", "=", "RrCause", "(", ")", "d", "=", "RequestReference", "(", ")", "e", "=", "TimingAdvance", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "return", "packet" ]
VGCS UPLINK GRANT Section 9.1.49
[ "VGCS", "UPLINK", "GRANT", "Section", "9", ".", "1", ".", "49" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1258-L1266
train
237,208
phaethon/kamene
kamene/contrib/gsm_um.py
extendedMeasurementOrder
def extendedMeasurementOrder(): """EXTENDED MEASUREMENT ORDER Section 9.1.51""" a = L2PseudoLength(l2pLength=0x12) b = TpPd(pd=0x6) c = MessageType(mesType=0x37) # 00110111 d = ExtendedMeasurementFrequencyList() packet = a / b / c / d return packet
python
def extendedMeasurementOrder(): """EXTENDED MEASUREMENT ORDER Section 9.1.51""" a = L2PseudoLength(l2pLength=0x12) b = TpPd(pd=0x6) c = MessageType(mesType=0x37) # 00110111 d = ExtendedMeasurementFrequencyList() packet = a / b / c / d return packet
[ "def", "extendedMeasurementOrder", "(", ")", ":", "a", "=", "L2PseudoLength", "(", "l2pLength", "=", "0x12", ")", "b", "=", "TpPd", "(", "pd", "=", "0x6", ")", "c", "=", "MessageType", "(", "mesType", "=", "0x37", ")", "# 00110111", "d", "=", "ExtendedMeasurementFrequencyList", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
EXTENDED MEASUREMENT ORDER Section 9.1.51
[ "EXTENDED", "MEASUREMENT", "ORDER", "Section", "9", ".", "1", ".", "51" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1283-L1290
train
237,209
phaethon/kamene
kamene/contrib/gsm_um.py
extendedMeasurementReport
def extendedMeasurementReport(): """EXTENDED MEASUREMENT REPORT Section 9.1.52""" a = TpPd(pd=0x6) b = MessageType(mesType=0x36) # 00110110 c = ExtendedMeasurementResults() packet = a / b / c return packet
python
def extendedMeasurementReport(): """EXTENDED MEASUREMENT REPORT Section 9.1.52""" a = TpPd(pd=0x6) b = MessageType(mesType=0x36) # 00110110 c = ExtendedMeasurementResults() packet = a / b / c return packet
[ "def", "extendedMeasurementReport", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x6", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x36", ")", "# 00110110", "c", "=", "ExtendedMeasurementResults", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
EXTENDED MEASUREMENT REPORT Section 9.1.52
[ "EXTENDED", "MEASUREMENT", "REPORT", "Section", "9", ".", "1", ".", "52" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1293-L1299
train
237,210
phaethon/kamene
kamene/contrib/gsm_um.py
applicationInformation
def applicationInformation(): """APPLICATION INFORMATION Section 9.1.53""" a = TpPd(pd=0x6) b = MessageType(mesType=0x38) # 00111000 c = ApduIDAndApduFlags() e = ApduData() packet = a / b / c / e return packet
python
def applicationInformation(): """APPLICATION INFORMATION Section 9.1.53""" a = TpPd(pd=0x6) b = MessageType(mesType=0x38) # 00111000 c = ApduIDAndApduFlags() e = ApduData() packet = a / b / c / e return packet
[ "def", "applicationInformation", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x6", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x38", ")", "# 00111000", "c", "=", "ApduIDAndApduFlags", "(", ")", "e", "=", "ApduData", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "return", "packet" ]
APPLICATION INFORMATION Section 9.1.53
[ "APPLICATION", "INFORMATION", "Section", "9", ".", "1", ".", "53" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1302-L1309
train
237,211
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationReject
def authenticationReject(): """AUTHENTICATION REJECT Section 9.2.1""" a = TpPd(pd=0x5) b = MessageType(mesType=0x11) # 00010001 packet = a / b return packet
python
def authenticationReject(): """AUTHENTICATION REJECT Section 9.2.1""" a = TpPd(pd=0x5) b = MessageType(mesType=0x11) # 00010001 packet = a / b return packet
[ "def", "authenticationReject", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x11", ")", "# 00010001", "packet", "=", "a", "/", "b", "return", "packet" ]
AUTHENTICATION REJECT Section 9.2.1
[ "AUTHENTICATION", "REJECT", "Section", "9", ".", "2", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1316-L1321
train
237,212
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationRequest
def authenticationRequest(): """AUTHENTICATION REQUEST Section 9.2.2""" a = TpPd(pd=0x5) b = MessageType(mesType=0x12) # 00010010 c = CiphKeySeqNrAndSpareHalfOctets() d = AuthenticationParameterRAND() packet = a / b / c / d return packet
python
def authenticationRequest(): """AUTHENTICATION REQUEST Section 9.2.2""" a = TpPd(pd=0x5) b = MessageType(mesType=0x12) # 00010010 c = CiphKeySeqNrAndSpareHalfOctets() d = AuthenticationParameterRAND() packet = a / b / c / d return packet
[ "def", "authenticationRequest", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x12", ")", "# 00010010", "c", "=", "CiphKeySeqNrAndSpareHalfOctets", "(", ")", "d", "=", "AuthenticationParameterRAND", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
AUTHENTICATION REQUEST Section 9.2.2
[ "AUTHENTICATION", "REQUEST", "Section", "9", ".", "2", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1325-L1332
train
237,213
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationResponse
def authenticationResponse(): """AUTHENTICATION RESPONSE Section 9.2.3""" a = TpPd(pd=0x5) b = MessageType(mesType=0x14) # 00010100 c = AuthenticationParameterSRES() packet = a / b / c return packet
python
def authenticationResponse(): """AUTHENTICATION RESPONSE Section 9.2.3""" a = TpPd(pd=0x5) b = MessageType(mesType=0x14) # 00010100 c = AuthenticationParameterSRES() packet = a / b / c return packet
[ "def", "authenticationResponse", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x14", ")", "# 00010100", "c", "=", "AuthenticationParameterSRES", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
AUTHENTICATION RESPONSE Section 9.2.3
[ "AUTHENTICATION", "RESPONSE", "Section", "9", ".", "2", ".", "3" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1335-L1341
train
237,214
phaethon/kamene
kamene/contrib/gsm_um.py
cmReestablishmentRequest
def cmReestablishmentRequest(LocalAreaId_presence=0): """CM RE-ESTABLISHMENT REQUEST Section 9.2.4""" a = TpPd(pd=0x5) b = MessageType(mesType=0x28) # 00101000 c = CiphKeySeqNrAndSpareHalfOctets() e = MobileStationClassmark2() f = MobileId() if LocalAreaId_presence is 1: g = LocalAreaId(iei=0x13, eightbit=0x0) packet = packet / g packet = a / b / c / e / f return packet
python
def cmReestablishmentRequest(LocalAreaId_presence=0): """CM RE-ESTABLISHMENT REQUEST Section 9.2.4""" a = TpPd(pd=0x5) b = MessageType(mesType=0x28) # 00101000 c = CiphKeySeqNrAndSpareHalfOctets() e = MobileStationClassmark2() f = MobileId() if LocalAreaId_presence is 1: g = LocalAreaId(iei=0x13, eightbit=0x0) packet = packet / g packet = a / b / c / e / f return packet
[ "def", "cmReestablishmentRequest", "(", "LocalAreaId_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x28", ")", "# 00101000", "c", "=", "CiphKeySeqNrAndSpareHalfOctets", "(", ")", "e", "=", "MobileStationClassmark2", "(", ")", "f", "=", "MobileId", "(", ")", "if", "LocalAreaId_presence", "is", "1", ":", "g", "=", "LocalAreaId", "(", "iei", "=", "0x13", ",", "eightbit", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "/", "f", "return", "packet" ]
CM RE-ESTABLISHMENT REQUEST Section 9.2.4
[ "CM", "RE", "-", "ESTABLISHMENT", "REQUEST", "Section", "9", ".", "2", ".", "4" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1344-L1355
train
237,215
phaethon/kamene
kamene/contrib/gsm_um.py
cmServiceAccept
def cmServiceAccept(): """CM SERVICE ACCEPT Section 9.2.5""" a = TpPd(pd=0x5) b = MessageType(mesType=0x21) # 00100001 packet = a / b return packet
python
def cmServiceAccept(): """CM SERVICE ACCEPT Section 9.2.5""" a = TpPd(pd=0x5) b = MessageType(mesType=0x21) # 00100001 packet = a / b return packet
[ "def", "cmServiceAccept", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x21", ")", "# 00100001", "packet", "=", "a", "/", "b", "return", "packet" ]
CM SERVICE ACCEPT Section 9.2.5
[ "CM", "SERVICE", "ACCEPT", "Section", "9", ".", "2", ".", "5" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1359-L1364
train
237,216
phaethon/kamene
kamene/contrib/gsm_um.py
cmServicePrompt
def cmServicePrompt(): """CM SERVICE PROMPT Section 9.2.5a""" a = TpPd(pd=0x5) b = MessageType(mesType=0x25) # 00100101 c = PdAndSapi() packet = a / b / c return packet
python
def cmServicePrompt(): """CM SERVICE PROMPT Section 9.2.5a""" a = TpPd(pd=0x5) b = MessageType(mesType=0x25) # 00100101 c = PdAndSapi() packet = a / b / c return packet
[ "def", "cmServicePrompt", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x25", ")", "# 00100101", "c", "=", "PdAndSapi", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
CM SERVICE PROMPT Section 9.2.5a
[ "CM", "SERVICE", "PROMPT", "Section", "9", ".", "2", ".", "5a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1368-L1374
train
237,217
phaethon/kamene
kamene/contrib/gsm_um.py
cmServiceAbort
def cmServiceAbort(): """CM SERVICE ABORT Section 9.2.7""" a = TpPd(pd=0x5) b = MessageType(mesType=0x23) # 00100011 packet = a / b return packet
python
def cmServiceAbort(): """CM SERVICE ABORT Section 9.2.7""" a = TpPd(pd=0x5) b = MessageType(mesType=0x23) # 00100011 packet = a / b return packet
[ "def", "cmServiceAbort", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x23", ")", "# 00100011", "packet", "=", "a", "/", "b", "return", "packet" ]
CM SERVICE ABORT Section 9.2.7
[ "CM", "SERVICE", "ABORT", "Section", "9", ".", "2", ".", "7" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1387-L1392
train
237,218
phaethon/kamene
kamene/contrib/gsm_um.py
abort
def abort(): """ABORT Section 9.2.8""" a = TpPd(pd=0x5) b = MessageType(mesType=0x29) # 00101001 c = RejectCause() packet = a / b / c return packet
python
def abort(): """ABORT Section 9.2.8""" a = TpPd(pd=0x5) b = MessageType(mesType=0x29) # 00101001 c = RejectCause() packet = a / b / c return packet
[ "def", "abort", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x29", ")", "# 00101001", "c", "=", "RejectCause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
ABORT Section 9.2.8
[ "ABORT", "Section", "9", ".", "2", ".", "8" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1396-L1402
train
237,219
phaethon/kamene
kamene/contrib/gsm_um.py
cmServiceRequest
def cmServiceRequest(PriorityLevel_presence=0): """CM SERVICE REQUEST Section 9.2.9""" a = TpPd(pd=0x5) b = MessageType(mesType=0x24) # 00100100 c = CmServiceTypeAndCiphKeySeqNr() e = MobileStationClassmark2() f = MobileId() packet = a / b / c / e / f if PriorityLevel_presence is 1: g = PriorityLevelHdr(ieiPL=0x8, eightBitPL=0x0) packet = packet / g return packet
python
def cmServiceRequest(PriorityLevel_presence=0): """CM SERVICE REQUEST Section 9.2.9""" a = TpPd(pd=0x5) b = MessageType(mesType=0x24) # 00100100 c = CmServiceTypeAndCiphKeySeqNr() e = MobileStationClassmark2() f = MobileId() packet = a / b / c / e / f if PriorityLevel_presence is 1: g = PriorityLevelHdr(ieiPL=0x8, eightBitPL=0x0) packet = packet / g return packet
[ "def", "cmServiceRequest", "(", "PriorityLevel_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x24", ")", "# 00100100", "c", "=", "CmServiceTypeAndCiphKeySeqNr", "(", ")", "e", "=", "MobileStationClassmark2", "(", ")", "f", "=", "MobileId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "/", "f", "if", "PriorityLevel_presence", "is", "1", ":", "g", "=", "PriorityLevelHdr", "(", "ieiPL", "=", "0x8", ",", "eightBitPL", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
CM SERVICE REQUEST Section 9.2.9
[ "CM", "SERVICE", "REQUEST", "Section", "9", ".", "2", ".", "9" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1405-L1416
train
237,220
phaethon/kamene
kamene/contrib/gsm_um.py
identityRequest
def identityRequest(): """IDENTITY REQUEST Section 9.2.10""" a = TpPd(pd=0x5) b = MessageType(mesType=0x8) # 00001000 c = IdentityTypeAndSpareHalfOctets() packet = a / b / c return packet
python
def identityRequest(): """IDENTITY REQUEST Section 9.2.10""" a = TpPd(pd=0x5) b = MessageType(mesType=0x8) # 00001000 c = IdentityTypeAndSpareHalfOctets() packet = a / b / c return packet
[ "def", "identityRequest", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x8", ")", "# 00001000", "c", "=", "IdentityTypeAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
IDENTITY REQUEST Section 9.2.10
[ "IDENTITY", "REQUEST", "Section", "9", ".", "2", ".", "10" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1420-L1426
train
237,221
phaethon/kamene
kamene/contrib/gsm_um.py
imsiDetachIndication
def imsiDetachIndication(): """IMSI DETACH INDICATION Section 9.2.12""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1) # 00000001 c = MobileStationClassmark1() d = MobileId() packet = a / b / c / d return packet
python
def imsiDetachIndication(): """IMSI DETACH INDICATION Section 9.2.12""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1) # 00000001 c = MobileStationClassmark1() d = MobileId() packet = a / b / c / d return packet
[ "def", "imsiDetachIndication", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1", ")", "# 00000001", "c", "=", "MobileStationClassmark1", "(", ")", "d", "=", "MobileId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
IMSI DETACH INDICATION Section 9.2.12
[ "IMSI", "DETACH", "INDICATION", "Section", "9", ".", "2", ".", "12" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1438-L1445
train
237,222
phaethon/kamene
kamene/contrib/gsm_um.py
locationUpdatingAccept
def locationUpdatingAccept(MobileId_presence=0, FollowOnProceed_presence=0, CtsPermission_presence=0): """LOCATION UPDATING ACCEPT Section 9.2.13""" a = TpPd(pd=0x5) b = MessageType(mesType=0x02) # 00000010 c = LocalAreaId() packet = a / b / c if MobileId_presence is 1: d = MobileIdHdr(ieiMI=0x17, eightBitMI=0x0) packet = packet / d if FollowOnProceed_presence is 1: e = FollowOnProceed(ieiFOP=0xA1) packet = packet / e if CtsPermission_presence is 1: f = CtsPermissionHdr(ieiCP=0xA2, eightBitCP=0x0) packet = packet / f return packet
python
def locationUpdatingAccept(MobileId_presence=0, FollowOnProceed_presence=0, CtsPermission_presence=0): """LOCATION UPDATING ACCEPT Section 9.2.13""" a = TpPd(pd=0x5) b = MessageType(mesType=0x02) # 00000010 c = LocalAreaId() packet = a / b / c if MobileId_presence is 1: d = MobileIdHdr(ieiMI=0x17, eightBitMI=0x0) packet = packet / d if FollowOnProceed_presence is 1: e = FollowOnProceed(ieiFOP=0xA1) packet = packet / e if CtsPermission_presence is 1: f = CtsPermissionHdr(ieiCP=0xA2, eightBitCP=0x0) packet = packet / f return packet
[ "def", "locationUpdatingAccept", "(", "MobileId_presence", "=", "0", ",", "FollowOnProceed_presence", "=", "0", ",", "CtsPermission_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x02", ")", "# 00000010", "c", "=", "LocalAreaId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "MobileId_presence", "is", "1", ":", "d", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x17", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "FollowOnProceed_presence", "is", "1", ":", "e", "=", "FollowOnProceed", "(", "ieiFOP", "=", "0xA1", ")", "packet", "=", "packet", "/", "e", "if", "CtsPermission_presence", "is", "1", ":", "f", "=", "CtsPermissionHdr", "(", "ieiCP", "=", "0xA2", ",", "eightBitCP", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
LOCATION UPDATING ACCEPT Section 9.2.13
[ "LOCATION", "UPDATING", "ACCEPT", "Section", "9", ".", "2", ".", "13" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1449-L1466
train
237,223
phaethon/kamene
kamene/contrib/gsm_um.py
locationUpdatingRequest
def locationUpdatingRequest(): """LOCATION UPDATING REQUEST Section 9.2.15""" a = TpPd(pd=0x5) b = MessageType(mesType=0x8) # 00001000 c = LocationUpdatingTypeAndCiphKeySeqNr() e = LocalAreaId() f = MobileStationClassmark1() g = MobileId() packet = a / b / c / e / f / g return packet
python
def locationUpdatingRequest(): """LOCATION UPDATING REQUEST Section 9.2.15""" a = TpPd(pd=0x5) b = MessageType(mesType=0x8) # 00001000 c = LocationUpdatingTypeAndCiphKeySeqNr() e = LocalAreaId() f = MobileStationClassmark1() g = MobileId() packet = a / b / c / e / f / g return packet
[ "def", "locationUpdatingRequest", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x8", ")", "# 00001000", "c", "=", "LocationUpdatingTypeAndCiphKeySeqNr", "(", ")", "e", "=", "LocalAreaId", "(", ")", "f", "=", "MobileStationClassmark1", "(", ")", "g", "=", "MobileId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "/", "f", "/", "g", "return", "packet" ]
LOCATION UPDATING REQUEST Section 9.2.15
[ "LOCATION", "UPDATING", "REQUEST", "Section", "9", ".", "2", ".", "15" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1479-L1488
train
237,224
phaethon/kamene
kamene/contrib/gsm_um.py
mmInformation
def mmInformation(NetworkName_presence=0, NetworkName_presence1=0, TimeZone_presence=0, TimeZoneAndTime_presence=0, LsaIdentifier_presence=0): """MM INFORMATION Section 9.2.15a""" a = TpPd(pd=0x5) b = MessageType(mesType=0x32) # 00110010 packet = a / b if NetworkName_presence is 1: c = NetworkNameHdr(ieiNN=0x43, eightBitNN=0x0) packet = packet / c if NetworkName_presence1 is 1: d = NetworkNameHdr(ieiNN=0x45, eightBitNN=0x0) packet = packet / d if TimeZone_presence is 1: e = TimeZoneHdr(ieiTZ=0x46, eightBitTZ=0x0) packet = packet / e if TimeZoneAndTime_presence is 1: f = TimeZoneAndTimeHdr(ieiTZAT=0x47, eightBitTZAT=0x0) packet = packet / f if LsaIdentifier_presence is 1: g = LsaIdentifierHdr(ieiLI=0x48, eightBitLI=0x0) packet = packet / g return packet
python
def mmInformation(NetworkName_presence=0, NetworkName_presence1=0, TimeZone_presence=0, TimeZoneAndTime_presence=0, LsaIdentifier_presence=0): """MM INFORMATION Section 9.2.15a""" a = TpPd(pd=0x5) b = MessageType(mesType=0x32) # 00110010 packet = a / b if NetworkName_presence is 1: c = NetworkNameHdr(ieiNN=0x43, eightBitNN=0x0) packet = packet / c if NetworkName_presence1 is 1: d = NetworkNameHdr(ieiNN=0x45, eightBitNN=0x0) packet = packet / d if TimeZone_presence is 1: e = TimeZoneHdr(ieiTZ=0x46, eightBitTZ=0x0) packet = packet / e if TimeZoneAndTime_presence is 1: f = TimeZoneAndTimeHdr(ieiTZAT=0x47, eightBitTZAT=0x0) packet = packet / f if LsaIdentifier_presence is 1: g = LsaIdentifierHdr(ieiLI=0x48, eightBitLI=0x0) packet = packet / g return packet
[ "def", "mmInformation", "(", "NetworkName_presence", "=", "0", ",", "NetworkName_presence1", "=", "0", ",", "TimeZone_presence", "=", "0", ",", "TimeZoneAndTime_presence", "=", "0", ",", "LsaIdentifier_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x32", ")", "# 00110010", "packet", "=", "a", "/", "b", "if", "NetworkName_presence", "is", "1", ":", "c", "=", "NetworkNameHdr", "(", "ieiNN", "=", "0x43", ",", "eightBitNN", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "NetworkName_presence1", "is", "1", ":", "d", "=", "NetworkNameHdr", "(", "ieiNN", "=", "0x45", ",", "eightBitNN", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "TimeZone_presence", "is", "1", ":", "e", "=", "TimeZoneHdr", "(", "ieiTZ", "=", "0x46", ",", "eightBitTZ", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "TimeZoneAndTime_presence", "is", "1", ":", "f", "=", "TimeZoneAndTimeHdr", "(", "ieiTZAT", "=", "0x47", ",", "eightBitTZAT", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "if", "LsaIdentifier_presence", "is", "1", ":", "g", "=", "LsaIdentifierHdr", "(", "ieiLI", "=", "0x48", ",", "eightBitLI", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
MM INFORMATION Section 9.2.15a
[ "MM", "INFORMATION", "Section", "9", ".", "2", ".", "15a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1492-L1514
train
237,225
phaethon/kamene
kamene/contrib/gsm_um.py
tmsiReallocationCommand
def tmsiReallocationCommand(): """TMSI REALLOCATION COMMAND Section 9.2.17""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1a) # 00011010 c = LocalAreaId() d = MobileId() packet = a / b / c / d return packet
python
def tmsiReallocationCommand(): """TMSI REALLOCATION COMMAND Section 9.2.17""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1a) # 00011010 c = LocalAreaId() d = MobileId() packet = a / b / c / d return packet
[ "def", "tmsiReallocationCommand", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1a", ")", "# 00011010", "c", "=", "LocalAreaId", "(", ")", "d", "=", "MobileId", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
TMSI REALLOCATION COMMAND Section 9.2.17
[ "TMSI", "REALLOCATION", "COMMAND", "Section", "9", ".", "2", ".", "17" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1527-L1534
train
237,226
phaethon/kamene
kamene/contrib/gsm_um.py
tmsiReallocationComplete
def tmsiReallocationComplete(): """TMSI REALLOCATION COMPLETE Section 9.2.18""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1b) # 00011011 packet = a / b return packet
python
def tmsiReallocationComplete(): """TMSI REALLOCATION COMPLETE Section 9.2.18""" a = TpPd(pd=0x5) b = MessageType(mesType=0x1b) # 00011011 packet = a / b return packet
[ "def", "tmsiReallocationComplete", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1b", ")", "# 00011011", "packet", "=", "a", "/", "b", "return", "packet" ]
TMSI REALLOCATION COMPLETE Section 9.2.18
[ "TMSI", "REALLOCATION", "COMPLETE", "Section", "9", ".", "2", ".", "18" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1537-L1542
train
237,227
phaethon/kamene
kamene/contrib/gsm_um.py
mmNull
def mmNull(): """MM NULL Section 9.2.19""" a = TpPd(pd=0x5) b = MessageType(mesType=0x30) # 00110000 packet = a / b return packet
python
def mmNull(): """MM NULL Section 9.2.19""" a = TpPd(pd=0x5) b = MessageType(mesType=0x30) # 00110000 packet = a / b return packet
[ "def", "mmNull", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x5", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x30", ")", "# 00110000", "packet", "=", "a", "/", "b", "return", "packet" ]
MM NULL Section 9.2.19
[ "MM", "NULL", "Section", "9", ".", "2", ".", "19" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1545-L1550
train
237,228
phaethon/kamene
kamene/contrib/gsm_um.py
alertingNetToMs
def alertingNetToMs(Facility_presence=0, ProgressIndicator_presence=0, UserUser_presence=0): """ALERTING Section 9.3.1.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1) # 00000001 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C) packet = packet / c if ProgressIndicator_presence is 1: d = ProgressIndicatorHdr(ieiPI=0x1E) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E) packet = packet / e return packet
python
def alertingNetToMs(Facility_presence=0, ProgressIndicator_presence=0, UserUser_presence=0): """ALERTING Section 9.3.1.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1) # 00000001 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C) packet = packet / c if ProgressIndicator_presence is 1: d = ProgressIndicatorHdr(ieiPI=0x1E) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E) packet = packet / e return packet
[ "def", "alertingNetToMs", "(", "Facility_presence", "=", "0", ",", "ProgressIndicator_presence", "=", "0", ",", "UserUser_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1", ")", "# 00000001", "packet", "=", "a", "/", "b", "if", "Facility_presence", "is", "1", ":", "c", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ")", "packet", "=", "packet", "/", "c", "if", "ProgressIndicator_presence", "is", "1", ":", "d", "=", "ProgressIndicatorHdr", "(", "ieiPI", "=", "0x1E", ")", "packet", "=", "packet", "/", "d", "if", "UserUser_presence", "is", "1", ":", "e", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ")", "packet", "=", "packet", "/", "e", "return", "packet" ]
ALERTING Section 9.3.1.1
[ "ALERTING", "Section", "9", ".", "3", ".", "1", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1558-L1573
train
237,229
phaethon/kamene
kamene/contrib/gsm_um.py
callConfirmed
def callConfirmed(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Cause_presence=0, CallControlCapabilities_presence=0): """CALL CONFIRMED Section 9.3.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x8) # 00001000 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Cause_presence is 1: f = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / f if CallControlCapabilities_presence is 1: g = CallControlCapabilitiesHdr(ieiCCC=0x15, eightBitCCC=0x0) packet = packet / g return packet
python
def callConfirmed(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Cause_presence=0, CallControlCapabilities_presence=0): """CALL CONFIRMED Section 9.3.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x8) # 00001000 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Cause_presence is 1: f = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / f if CallControlCapabilities_presence is 1: g = CallControlCapabilitiesHdr(ieiCCC=0x15, eightBitCCC=0x0) packet = packet / g return packet
[ "def", "callConfirmed", "(", "RepeatIndicator_presence", "=", "0", ",", "BearerCapability_presence", "=", "0", ",", "BearerCapability_presence1", "=", "0", ",", "Cause_presence", "=", "0", ",", "CallControlCapabilities_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x8", ")", "# 00001000", "packet", "=", "a", "/", "b", "if", "RepeatIndicator_presence", "is", "1", ":", "c", "=", "RepeatIndicatorHdr", "(", "ieiRI", "=", "0xD", ",", "eightBitRI", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "BearerCapability_presence", "is", "1", ":", "d", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "BearerCapability_presence1", "is", "1", ":", "e", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "Cause_presence", "is", "1", ":", "f", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "if", "CallControlCapabilities_presence", "is", "1", ":", "g", "=", "CallControlCapabilitiesHdr", "(", "ieiCCC", "=", "0x15", ",", "eightBitCCC", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
CALL CONFIRMED Section 9.3.2
[ "CALL", "CONFIRMED", "Section", "9", ".", "3", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1594-L1616
train
237,230
phaethon/kamene
kamene/contrib/gsm_um.py
callProceeding
def callProceeding(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Facility_presence=0, ProgressIndicator_presence=0, PriorityLevel_presence=0): """CALL PROCEEDING Section 9.3.3""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2) # 00000010 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Facility_presence is 1: f = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / f if ProgressIndicator_presence is 1: g = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / g if PriorityLevel_presence is 1: h = PriorityLevelHdr(ieiPL=0x80, eightBitPL=0x0) packet = packet / h return packet
python
def callProceeding(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Facility_presence=0, ProgressIndicator_presence=0, PriorityLevel_presence=0): """CALL PROCEEDING Section 9.3.3""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2) # 00000010 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Facility_presence is 1: f = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / f if ProgressIndicator_presence is 1: g = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / g if PriorityLevel_presence is 1: h = PriorityLevelHdr(ieiPL=0x80, eightBitPL=0x0) packet = packet / h return packet
[ "def", "callProceeding", "(", "RepeatIndicator_presence", "=", "0", ",", "BearerCapability_presence", "=", "0", ",", "BearerCapability_presence1", "=", "0", ",", "Facility_presence", "=", "0", ",", "ProgressIndicator_presence", "=", "0", ",", "PriorityLevel_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2", ")", "# 00000010", "packet", "=", "a", "/", "b", "if", "RepeatIndicator_presence", "is", "1", ":", "c", "=", "RepeatIndicatorHdr", "(", "ieiRI", "=", "0xD", ",", "eightBitRI", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "BearerCapability_presence", "is", "1", ":", "d", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "BearerCapability_presence1", "is", "1", ":", "e", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "Facility_presence", "is", "1", ":", "f", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "if", "ProgressIndicator_presence", "is", "1", ":", "g", "=", "ProgressIndicatorHdr", "(", "ieiPI", "=", "0x1E", ",", "eightBitPI", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "if", "PriorityLevel_presence", "is", "1", ":", "h", "=", "PriorityLevelHdr", "(", "ieiPL", "=", "0x80", ",", "eightBitPL", "=", "0x0", ")", "packet", "=", "packet", "/", "h", "return", "packet" ]
CALL PROCEEDING Section 9.3.3
[ "CALL", "PROCEEDING", "Section", "9", ".", "3", ".", "3" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1620-L1647
train
237,231
phaethon/kamene
kamene/contrib/gsm_um.py
congestionControl
def congestionControl(Cause_presence=0): """CONGESTION CONTROL Section 9.3.4""" a = TpPd(pd=0x3) b = MessageType(mesType=0x39) # 00111001 c = CongestionLevelAndSpareHalfOctets() packet = a / b / c if Cause_presence is 1: e = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / e return packet
python
def congestionControl(Cause_presence=0): """CONGESTION CONTROL Section 9.3.4""" a = TpPd(pd=0x3) b = MessageType(mesType=0x39) # 00111001 c = CongestionLevelAndSpareHalfOctets() packet = a / b / c if Cause_presence is 1: e = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / e return packet
[ "def", "congestionControl", "(", "Cause_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x39", ")", "# 00111001", "c", "=", "CongestionLevelAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "Cause_presence", "is", "1", ":", "e", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "return", "packet" ]
CONGESTION CONTROL Section 9.3.4
[ "CONGESTION", "CONTROL", "Section", "9", ".", "3", ".", "4" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1651-L1660
train
237,232
phaethon/kamene
kamene/contrib/gsm_um.py
connectNetToMs
def connectNetToMs(Facility_presence=0, ProgressIndicator_presence=0, ConnectedNumber_presence=0, ConnectedSubaddress_presence=0, UserUser_presence=0): """CONNECT Section 9.3.5.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x7) # 00000111 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / c if ProgressIndicator_presence is 1: d = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / d if ConnectedNumber_presence is 1: e = ConnectedNumberHdr(ieiCN=0x4C, eightBitCN=0x0) packet = packet / e if ConnectedSubaddress_presence is 1: f = ConnectedSubaddressHdr(ieiCS=0x4D, eightBitCS=0x0) packet = packet / f if UserUser_presence is 1: g = UserUserHdr(ieiUU=0x7F, eightBitUU=0x0) packet = packet / g return packet
python
def connectNetToMs(Facility_presence=0, ProgressIndicator_presence=0, ConnectedNumber_presence=0, ConnectedSubaddress_presence=0, UserUser_presence=0): """CONNECT Section 9.3.5.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x7) # 00000111 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / c if ProgressIndicator_presence is 1: d = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / d if ConnectedNumber_presence is 1: e = ConnectedNumberHdr(ieiCN=0x4C, eightBitCN=0x0) packet = packet / e if ConnectedSubaddress_presence is 1: f = ConnectedSubaddressHdr(ieiCS=0x4D, eightBitCS=0x0) packet = packet / f if UserUser_presence is 1: g = UserUserHdr(ieiUU=0x7F, eightBitUU=0x0) packet = packet / g return packet
[ "def", "connectNetToMs", "(", "Facility_presence", "=", "0", ",", "ProgressIndicator_presence", "=", "0", ",", "ConnectedNumber_presence", "=", "0", ",", "ConnectedSubaddress_presence", "=", "0", ",", "UserUser_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x7", ")", "# 00000111", "packet", "=", "a", "/", "b", "if", "Facility_presence", "is", "1", ":", "c", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "ProgressIndicator_presence", "is", "1", ":", "d", "=", "ProgressIndicatorHdr", "(", "ieiPI", "=", "0x1E", ",", "eightBitPI", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "ConnectedNumber_presence", "is", "1", ":", "e", "=", "ConnectedNumberHdr", "(", "ieiCN", "=", "0x4C", ",", "eightBitCN", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "ConnectedSubaddress_presence", "is", "1", ":", "f", "=", "ConnectedSubaddressHdr", "(", "ieiCS", "=", "0x4D", ",", "eightBitCS", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "if", "UserUser_presence", "is", "1", ":", "g", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7F", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
CONNECT Section 9.3.5.1
[ "CONNECT", "Section", "9", ".", "3", ".", "5", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1664-L1686
train
237,233
phaethon/kamene
kamene/contrib/gsm_um.py
connectMsToNet
def connectMsToNet(Facility_presence=0, ConnectedSubaddress_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """CONNECT Section 9.3.5.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x7) # 00000111 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / c if ConnectedSubaddress_presence is 1: d = ConnectedSubaddressHdr(ieiCS=0x4D, eightBitCS=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7F, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
python
def connectMsToNet(Facility_presence=0, ConnectedSubaddress_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """CONNECT Section 9.3.5.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x7) # 00000111 packet = a / b if Facility_presence is 1: c = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / c if ConnectedSubaddress_presence is 1: d = ConnectedSubaddressHdr(ieiCS=0x4D, eightBitCS=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7F, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
[ "def", "connectMsToNet", "(", "Facility_presence", "=", "0", ",", "ConnectedSubaddress_presence", "=", "0", ",", "UserUser_presence", "=", "0", ",", "SsVersionIndicator_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x7", ")", "# 00000111", "packet", "=", "a", "/", "b", "if", "Facility_presence", "is", "1", ":", "c", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "ConnectedSubaddress_presence", "is", "1", ":", "d", "=", "ConnectedSubaddressHdr", "(", "ieiCS", "=", "0x4D", ",", "eightBitCS", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "UserUser_presence", "is", "1", ":", "e", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7F", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "SsVersionIndicator_presence", "is", "1", ":", "f", "=", "SsVersionIndicatorHdr", "(", "ieiSVI", "=", "0x7F", ",", "eightBitSVI", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
CONNECT Section 9.3.5.2
[ "CONNECT", "Section", "9", ".", "3", ".", "5", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1689-L1707
train
237,234
phaethon/kamene
kamene/contrib/gsm_um.py
connectAcknowledge
def connectAcknowledge(): """CONNECT ACKNOWLEDGE Section 9.3.6""" a = TpPd(pd=0x3) b = MessageType(mesType=0xf) # 00001111 packet = a / b return packet
python
def connectAcknowledge(): """CONNECT ACKNOWLEDGE Section 9.3.6""" a = TpPd(pd=0x3) b = MessageType(mesType=0xf) # 00001111 packet = a / b return packet
[ "def", "connectAcknowledge", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0xf", ")", "# 00001111", "packet", "=", "a", "/", "b", "return", "packet" ]
CONNECT ACKNOWLEDGE Section 9.3.6
[ "CONNECT", "ACKNOWLEDGE", "Section", "9", ".", "3", ".", "6" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1710-L1715
train
237,235
phaethon/kamene
kamene/contrib/gsm_um.py
disconnectNetToMs
def disconnectNetToMs(Facility_presence=0, ProgressIndicator_presence=0, UserUser_presence=0, AllowedActions_presence=0): """DISCONNECT Section 9.3.7.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x25) # 00100101 c = Cause() packet = a / b / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if ProgressIndicator_presence is 1: e = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / e if UserUser_presence is 1: f = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / f if AllowedActions_presence is 1: g = AllowedActionsHdr(ieiAA=0x7B, eightBitAA=0x0) packet = packet / g return packet
python
def disconnectNetToMs(Facility_presence=0, ProgressIndicator_presence=0, UserUser_presence=0, AllowedActions_presence=0): """DISCONNECT Section 9.3.7.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x25) # 00100101 c = Cause() packet = a / b / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if ProgressIndicator_presence is 1: e = ProgressIndicatorHdr(ieiPI=0x1E, eightBitPI=0x0) packet = packet / e if UserUser_presence is 1: f = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / f if AllowedActions_presence is 1: g = AllowedActionsHdr(ieiAA=0x7B, eightBitAA=0x0) packet = packet / g return packet
[ "def", "disconnectNetToMs", "(", "Facility_presence", "=", "0", ",", "ProgressIndicator_presence", "=", "0", ",", "UserUser_presence", "=", "0", ",", "AllowedActions_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x25", ")", "# 00100101", "c", "=", "Cause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "Facility_presence", "is", "1", ":", "d", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "ProgressIndicator_presence", "is", "1", ":", "e", "=", "ProgressIndicatorHdr", "(", "ieiPI", "=", "0x1E", ",", "eightBitPI", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "UserUser_presence", "is", "1", ":", "f", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "if", "AllowedActions_presence", "is", "1", ":", "g", "=", "AllowedActionsHdr", "(", "ieiAA", "=", "0x7B", ",", "eightBitAA", "=", "0x0", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
DISCONNECT Section 9.3.7.1
[ "DISCONNECT", "Section", "9", ".", "3", ".", "7", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1719-L1738
train
237,236
phaethon/kamene
kamene/contrib/gsm_um.py
disconnectMsToNet
def disconnectMsToNet(Facility_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """Disconnect Section 9.3.7.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x25) # 00100101 c = Cause() packet = a / b / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
python
def disconnectMsToNet(Facility_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """Disconnect Section 9.3.7.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x25) # 00100101 c = Cause() packet = a / b / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
[ "def", "disconnectMsToNet", "(", "Facility_presence", "=", "0", ",", "UserUser_presence", "=", "0", ",", "SsVersionIndicator_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x25", ")", "# 00100101", "c", "=", "Cause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "Facility_presence", "is", "1", ":", "d", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "UserUser_presence", "is", "1", ":", "e", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "SsVersionIndicator_presence", "is", "1", ":", "f", "=", "SsVersionIndicatorHdr", "(", "ieiSVI", "=", "0x7F", ",", "eightBitSVI", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
Disconnect Section 9.3.7.2
[ "Disconnect", "Section", "9", ".", "3", ".", "7", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1741-L1757
train
237,237
phaethon/kamene
kamene/contrib/gsm_um.py
emergencySetup
def emergencySetup(BearerCapability_presence=0): """EMERGENCY SETUP Section 9.3.8""" a = TpPd(pd=0x3) b = MessageType(mesType=0xe) # 00001110 packet = a / b if BearerCapability_presence is 1: c = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / c return packet
python
def emergencySetup(BearerCapability_presence=0): """EMERGENCY SETUP Section 9.3.8""" a = TpPd(pd=0x3) b = MessageType(mesType=0xe) # 00001110 packet = a / b if BearerCapability_presence is 1: c = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / c return packet
[ "def", "emergencySetup", "(", "BearerCapability_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0xe", ")", "# 00001110", "packet", "=", "a", "/", "b", "if", "BearerCapability_presence", "is", "1", ":", "c", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "return", "packet" ]
EMERGENCY SETUP Section 9.3.8
[ "EMERGENCY", "SETUP", "Section", "9", ".", "3", ".", "8" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1760-L1768
train
237,238
phaethon/kamene
kamene/contrib/gsm_um.py
facilityNetToMs
def facilityNetToMs(): """FACILITY Section 9.3.9.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3a) # 00111010 c = Facility() packet = a / b / c return packet
python
def facilityNetToMs(): """FACILITY Section 9.3.9.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3a) # 00111010 c = Facility() packet = a / b / c return packet
[ "def", "facilityNetToMs", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3a", ")", "# 00111010", "c", "=", "Facility", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
FACILITY Section 9.3.9.1
[ "FACILITY", "Section", "9", ".", "3", ".", "9", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1772-L1778
train
237,239
phaethon/kamene
kamene/contrib/gsm_um.py
facilityMsToNet
def facilityMsToNet(SsVersionIndicator_presence=0): """FACILITY Section 9.3.9.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3a) # 00111010 c = Facility() packet = a / b / c if SsVersionIndicator_presence is 1: d = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / d return packet
python
def facilityMsToNet(SsVersionIndicator_presence=0): """FACILITY Section 9.3.9.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3a) # 00111010 c = Facility() packet = a / b / c if SsVersionIndicator_presence is 1: d = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / d return packet
[ "def", "facilityMsToNet", "(", "SsVersionIndicator_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3a", ")", "# 00111010", "c", "=", "Facility", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "SsVersionIndicator_presence", "is", "1", ":", "d", "=", "SsVersionIndicatorHdr", "(", "ieiSVI", "=", "0x7F", ",", "eightBitSVI", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "return", "packet" ]
FACILITY Section 9.3.9.2
[ "FACILITY", "Section", "9", ".", "3", ".", "9", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1781-L1790
train
237,240
phaethon/kamene
kamene/contrib/gsm_um.py
hold
def hold(): """HOLD Section 9.3.10""" a = TpPd(pd=0x3) b = MessageType(mesType=0x18) # 00011000 packet = a / b return packet
python
def hold(): """HOLD Section 9.3.10""" a = TpPd(pd=0x3) b = MessageType(mesType=0x18) # 00011000 packet = a / b return packet
[ "def", "hold", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x18", ")", "# 00011000", "packet", "=", "a", "/", "b", "return", "packet" ]
HOLD Section 9.3.10
[ "HOLD", "Section", "9", ".", "3", ".", "10" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1793-L1798
train
237,241
phaethon/kamene
kamene/contrib/gsm_um.py
holdAcknowledge
def holdAcknowledge(): """HOLD ACKNOWLEDGE Section 9.3.11""" a = TpPd(pd=0x3) b = MessageType(mesType=0x19) # 00011001 packet = a / b return packet
python
def holdAcknowledge(): """HOLD ACKNOWLEDGE Section 9.3.11""" a = TpPd(pd=0x3) b = MessageType(mesType=0x19) # 00011001 packet = a / b return packet
[ "def", "holdAcknowledge", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x19", ")", "# 00011001", "packet", "=", "a", "/", "b", "return", "packet" ]
HOLD ACKNOWLEDGE Section 9.3.11
[ "HOLD", "ACKNOWLEDGE", "Section", "9", ".", "3", ".", "11" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1802-L1807
train
237,242
phaethon/kamene
kamene/contrib/gsm_um.py
modify
def modify(LowLayerCompatibility_presence=0, HighLayerCompatibility_presence=0, ReverseCallSetupDirection_presence=0): """MODIFY Section 9.3.13""" a = TpPd(pd=0x3) b = MessageType(mesType=0x17) # 00010111 c = BearerCapability() packet = a / b / c if LowLayerCompatibility_presence is 1: d = LowLayerCompatibilityHdr(ieiLLC=0x7C, eightBitLLC=0x0) packet = packet / d if HighLayerCompatibility_presence is 1: e = HighLayerCompatibilityHdr(ieiHLC=0x7D, eightBitHLC=0x0) packet = packet / e if ReverseCallSetupDirection_presence is 1: f = ReverseCallSetupDirectionHdr(ieiRCSD=0xA3) packet = packet / f return packet
python
def modify(LowLayerCompatibility_presence=0, HighLayerCompatibility_presence=0, ReverseCallSetupDirection_presence=0): """MODIFY Section 9.3.13""" a = TpPd(pd=0x3) b = MessageType(mesType=0x17) # 00010111 c = BearerCapability() packet = a / b / c if LowLayerCompatibility_presence is 1: d = LowLayerCompatibilityHdr(ieiLLC=0x7C, eightBitLLC=0x0) packet = packet / d if HighLayerCompatibility_presence is 1: e = HighLayerCompatibilityHdr(ieiHLC=0x7D, eightBitHLC=0x0) packet = packet / e if ReverseCallSetupDirection_presence is 1: f = ReverseCallSetupDirectionHdr(ieiRCSD=0xA3) packet = packet / f return packet
[ "def", "modify", "(", "LowLayerCompatibility_presence", "=", "0", ",", "HighLayerCompatibility_presence", "=", "0", ",", "ReverseCallSetupDirection_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x17", ")", "# 00010111", "c", "=", "BearerCapability", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "LowLayerCompatibility_presence", "is", "1", ":", "d", "=", "LowLayerCompatibilityHdr", "(", "ieiLLC", "=", "0x7C", ",", "eightBitLLC", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "HighLayerCompatibility_presence", "is", "1", ":", "e", "=", "HighLayerCompatibilityHdr", "(", "ieiHLC", "=", "0x7D", ",", "eightBitHLC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "ReverseCallSetupDirection_presence", "is", "1", ":", "f", "=", "ReverseCallSetupDirectionHdr", "(", "ieiRCSD", "=", "0xA3", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
MODIFY Section 9.3.13
[ "MODIFY", "Section", "9", ".", "3", ".", "13" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1820-L1837
train
237,243
phaethon/kamene
kamene/contrib/gsm_um.py
modifyReject
def modifyReject(LowLayerCompatibility_presence=0, HighLayerCompatibility_presence=0): """MODIFY REJECT Section 9.3.15""" a = TpPd(pd=0x3) b = MessageType(mesType=0x13) # 00010011 c = BearerCapability() d = Cause() packet = a / b / c / d if LowLayerCompatibility_presence is 1: e = LowLayerCompatibilityHdr(ieiLLC=0x7C, eightBitLLC=0x0) packet = packet / e if HighLayerCompatibility_presence is 1: f = HighLayerCompatibilityHdr(ieiHLC=0x7D, eightBitHLC=0x0) packet = packet / f return packet
python
def modifyReject(LowLayerCompatibility_presence=0, HighLayerCompatibility_presence=0): """MODIFY REJECT Section 9.3.15""" a = TpPd(pd=0x3) b = MessageType(mesType=0x13) # 00010011 c = BearerCapability() d = Cause() packet = a / b / c / d if LowLayerCompatibility_presence is 1: e = LowLayerCompatibilityHdr(ieiLLC=0x7C, eightBitLLC=0x0) packet = packet / e if HighLayerCompatibility_presence is 1: f = HighLayerCompatibilityHdr(ieiHLC=0x7D, eightBitHLC=0x0) packet = packet / f return packet
[ "def", "modifyReject", "(", "LowLayerCompatibility_presence", "=", "0", ",", "HighLayerCompatibility_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x13", ")", "# 00010011", "c", "=", "BearerCapability", "(", ")", "d", "=", "Cause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "if", "LowLayerCompatibility_presence", "is", "1", ":", "e", "=", "LowLayerCompatibilityHdr", "(", "ieiLLC", "=", "0x7C", ",", "eightBitLLC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "HighLayerCompatibility_presence", "is", "1", ":", "f", "=", "HighLayerCompatibilityHdr", "(", "ieiHLC", "=", "0x7D", ",", "eightBitHLC", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
MODIFY REJECT Section 9.3.15
[ "MODIFY", "REJECT", "Section", "9", ".", "3", ".", "15" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1860-L1874
train
237,244
phaethon/kamene
kamene/contrib/gsm_um.py
notify
def notify(): """NOTIFY Section 9.3.16""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3e) # 00111110 c = NotificationIndicator() packet = a / b / c return packet
python
def notify(): """NOTIFY Section 9.3.16""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3e) # 00111110 c = NotificationIndicator() packet = a / b / c return packet
[ "def", "notify", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3e", ")", "# 00111110", "c", "=", "NotificationIndicator", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
NOTIFY Section 9.3.16
[ "NOTIFY", "Section", "9", ".", "3", ".", "16" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1877-L1883
train
237,245
phaethon/kamene
kamene/contrib/gsm_um.py
progress
def progress(UserUser_presence=0): """PROGRESS Section 9.3.17""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3) # 00000011 c = ProgressIndicator() packet = a / b / c if UserUser_presence is 1: d = UserUserHdr() packet = packet / d return packet
python
def progress(UserUser_presence=0): """PROGRESS Section 9.3.17""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3) # 00000011 c = ProgressIndicator() packet = a / b / c if UserUser_presence is 1: d = UserUserHdr() packet = packet / d return packet
[ "def", "progress", "(", "UserUser_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3", ")", "# 00000011", "c", "=", "ProgressIndicator", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "UserUser_presence", "is", "1", ":", "d", "=", "UserUserHdr", "(", ")", "packet", "=", "packet", "/", "d", "return", "packet" ]
PROGRESS Section 9.3.17
[ "PROGRESS", "Section", "9", ".", "3", ".", "17" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1887-L1896
train
237,246
phaethon/kamene
kamene/contrib/gsm_um.py
ccEstablishment
def ccEstablishment(): """CC-ESTABLISHMENT Section 9.3.17a""" a = TpPd(pd=0x3) b = MessageType(mesType=0x4) # 00000100 c = SetupContainer() packet = a / b / c return packet
python
def ccEstablishment(): """CC-ESTABLISHMENT Section 9.3.17a""" a = TpPd(pd=0x3) b = MessageType(mesType=0x4) # 00000100 c = SetupContainer() packet = a / b / c return packet
[ "def", "ccEstablishment", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x4", ")", "# 00000100", "c", "=", "SetupContainer", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
CC-ESTABLISHMENT Section 9.3.17a
[ "CC", "-", "ESTABLISHMENT", "Section", "9", ".", "3", ".", "17a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1900-L1906
train
237,247
phaethon/kamene
kamene/contrib/gsm_um.py
ccEstablishmentConfirmed
def ccEstablishmentConfirmed(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Cause_presence=0): """CC-ESTABLISHMENT CONFIRMED Section 9.3.17b""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Cause_presence is 1: f = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / f return packet
python
def ccEstablishmentConfirmed(RepeatIndicator_presence=0, BearerCapability_presence=0, BearerCapability_presence1=0, Cause_presence=0): """CC-ESTABLISHMENT CONFIRMED Section 9.3.17b""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 packet = a / b if RepeatIndicator_presence is 1: c = RepeatIndicatorHdr(ieiRI=0xD, eightBitRI=0x0) packet = packet / c if BearerCapability_presence is 1: d = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / d if BearerCapability_presence1 is 1: e = BearerCapabilityHdr(ieiBC=0x04, eightBitBC=0x0) packet = packet / e if Cause_presence is 1: f = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / f return packet
[ "def", "ccEstablishmentConfirmed", "(", "RepeatIndicator_presence", "=", "0", ",", "BearerCapability_presence", "=", "0", ",", "BearerCapability_presence1", "=", "0", ",", "Cause_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x6", ")", "# 00000110", "packet", "=", "a", "/", "b", "if", "RepeatIndicator_presence", "is", "1", ":", "c", "=", "RepeatIndicatorHdr", "(", "ieiRI", "=", "0xD", ",", "eightBitRI", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "BearerCapability_presence", "is", "1", ":", "d", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "BearerCapability_presence1", "is", "1", ":", "e", "=", "BearerCapabilityHdr", "(", "ieiBC", "=", "0x04", ",", "eightBitBC", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "Cause_presence", "is", "1", ":", "f", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
CC-ESTABLISHMENT CONFIRMED Section 9.3.17b
[ "CC", "-", "ESTABLISHMENT", "CONFIRMED", "Section", "9", ".", "3", ".", "17b" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1909-L1929
train
237,248
phaethon/kamene
kamene/contrib/gsm_um.py
releaseNetToMs
def releaseNetToMs(): """RELEASE Section 9.3.18.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2d) # 00101101 c = CauseHdr(ieiC=0x08, eightBitC=0x0) d = CauseHdr(ieiC=0x08, eightBitC=0x0) e = FacilityHdr(ieiF=0x1C, eightBitF=0x0) f = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = a / b / c / d / e / f return packet
python
def releaseNetToMs(): """RELEASE Section 9.3.18.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2d) # 00101101 c = CauseHdr(ieiC=0x08, eightBitC=0x0) d = CauseHdr(ieiC=0x08, eightBitC=0x0) e = FacilityHdr(ieiF=0x1C, eightBitF=0x0) f = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = a / b / c / d / e / f return packet
[ "def", "releaseNetToMs", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2d", ")", "# 00101101", "c", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "d", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "e", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "f", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "/", "f", "return", "packet" ]
RELEASE Section 9.3.18.1
[ "RELEASE", "Section", "9", ".", "3", ".", "18", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1933-L1942
train
237,249
phaethon/kamene
kamene/contrib/gsm_um.py
recall
def recall(): """RECALL Section 9.3.18a""" a = TpPd(pd=0x3) b = MessageType(mesType=0xb) # 00001011 c = RecallType() d = Facility() packet = a / b / c / d return packet
python
def recall(): """RECALL Section 9.3.18a""" a = TpPd(pd=0x3) b = MessageType(mesType=0xb) # 00001011 c = RecallType() d = Facility() packet = a / b / c / d return packet
[ "def", "recall", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0xb", ")", "# 00001011", "c", "=", "RecallType", "(", ")", "d", "=", "Facility", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
RECALL Section 9.3.18a
[ "RECALL", "Section", "9", ".", "3", ".", "18a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1971-L1978
train
237,250
phaethon/kamene
kamene/contrib/gsm_um.py
releaseCompleteNetToMs
def releaseCompleteNetToMs(Cause_presence=0, Facility_presence=0, UserUser_presence=0): """RELEASE COMPLETE Section 9.3.19.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2a) # 00101010 packet = a / b if Cause_presence is 1: c = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e return packet
python
def releaseCompleteNetToMs(Cause_presence=0, Facility_presence=0, UserUser_presence=0): """RELEASE COMPLETE Section 9.3.19.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2a) # 00101010 packet = a / b if Cause_presence is 1: c = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e return packet
[ "def", "releaseCompleteNetToMs", "(", "Cause_presence", "=", "0", ",", "Facility_presence", "=", "0", ",", "UserUser_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2a", ")", "# 00101010", "packet", "=", "a", "/", "b", "if", "Cause_presence", "is", "1", ":", "c", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "Facility_presence", "is", "1", ":", "d", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "UserUser_presence", "is", "1", ":", "e", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "return", "packet" ]
RELEASE COMPLETE Section 9.3.19.1
[ "RELEASE", "COMPLETE", "Section", "9", ".", "3", ".", "19", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L1982-L1997
train
237,251
phaethon/kamene
kamene/contrib/gsm_um.py
releaseCompleteMsToNet
def releaseCompleteMsToNet(Cause_presence=0, Facility_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """RELEASE COMPLETE Section 9.3.19.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2a) # 00101010 packet = a / b if Cause_presence is 1: c = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
python
def releaseCompleteMsToNet(Cause_presence=0, Facility_presence=0, UserUser_presence=0, SsVersionIndicator_presence=0): """RELEASE COMPLETE Section 9.3.19.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2a) # 00101010 packet = a / b if Cause_presence is 1: c = CauseHdr(ieiC=0x08, eightBitC=0x0) packet = packet / c if Facility_presence is 1: d = FacilityHdr(ieiF=0x1C, eightBitF=0x0) packet = packet / d if UserUser_presence is 1: e = UserUserHdr(ieiUU=0x7E, eightBitUU=0x0) packet = packet / e if SsVersionIndicator_presence is 1: f = SsVersionIndicatorHdr(ieiSVI=0x7F, eightBitSVI=0x0) packet = packet / f return packet
[ "def", "releaseCompleteMsToNet", "(", "Cause_presence", "=", "0", ",", "Facility_presence", "=", "0", ",", "UserUser_presence", "=", "0", ",", "SsVersionIndicator_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2a", ")", "# 00101010", "packet", "=", "a", "/", "b", "if", "Cause_presence", "is", "1", ":", "c", "=", "CauseHdr", "(", "ieiC", "=", "0x08", ",", "eightBitC", "=", "0x0", ")", "packet", "=", "packet", "/", "c", "if", "Facility_presence", "is", "1", ":", "d", "=", "FacilityHdr", "(", "ieiF", "=", "0x1C", ",", "eightBitF", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "if", "UserUser_presence", "is", "1", ":", "e", "=", "UserUserHdr", "(", "ieiUU", "=", "0x7E", ",", "eightBitUU", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "if", "SsVersionIndicator_presence", "is", "1", ":", "f", "=", "SsVersionIndicatorHdr", "(", "ieiSVI", "=", "0x7F", ",", "eightBitSVI", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
RELEASE COMPLETE Section 9.3.19.2
[ "RELEASE", "COMPLETE", "Section", "9", ".", "3", ".", "19", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2000-L2018
train
237,252
phaethon/kamene
kamene/contrib/gsm_um.py
retrieve
def retrieve(): """RETRIEVE Section 9.3.20""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1c) # 00011100 packet = a / b return packet
python
def retrieve(): """RETRIEVE Section 9.3.20""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1c) # 00011100 packet = a / b return packet
[ "def", "retrieve", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1c", ")", "# 00011100", "packet", "=", "a", "/", "b", "return", "packet" ]
RETRIEVE Section 9.3.20
[ "RETRIEVE", "Section", "9", ".", "3", ".", "20" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2021-L2026
train
237,253
phaethon/kamene
kamene/contrib/gsm_um.py
retrieveAcknowledge
def retrieveAcknowledge(): """RETRIEVE ACKNOWLEDGE Section 9.3.21""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1d) # 00011101 packet = a / b return packet
python
def retrieveAcknowledge(): """RETRIEVE ACKNOWLEDGE Section 9.3.21""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1d) # 00011101 packet = a / b return packet
[ "def", "retrieveAcknowledge", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1d", ")", "# 00011101", "packet", "=", "a", "/", "b", "return", "packet" ]
RETRIEVE ACKNOWLEDGE Section 9.3.21
[ "RETRIEVE", "ACKNOWLEDGE", "Section", "9", ".", "3", ".", "21" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2030-L2035
train
237,254
phaethon/kamene
kamene/contrib/gsm_um.py
startCc
def startCc(CallControlCapabilities_presence=0): """START CC Section 9.3.23a""" a = TpPd(pd=0x3) b = MessageType(mesType=0x9) # 00001001 packet = a / b if CallControlCapabilities_presence is 1: c = CallControlCapabilitiesHdr(ieiCCC=0x15, eightBitCCC=0x0) packet = paclet / c return packet
python
def startCc(CallControlCapabilities_presence=0): """START CC Section 9.3.23a""" a = TpPd(pd=0x3) b = MessageType(mesType=0x9) # 00001001 packet = a / b if CallControlCapabilities_presence is 1: c = CallControlCapabilitiesHdr(ieiCCC=0x15, eightBitCCC=0x0) packet = paclet / c return packet
[ "def", "startCc", "(", "CallControlCapabilities_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x9", ")", "# 00001001", "packet", "=", "a", "/", "b", "if", "CallControlCapabilities_presence", "is", "1", ":", "c", "=", "CallControlCapabilitiesHdr", "(", "ieiCCC", "=", "0x15", ",", "eightBitCCC", "=", "0x0", ")", "packet", "=", "paclet", "/", "c", "return", "packet" ]
START CC Section 9.3.23a
[ "START", "CC", "Section", "9", ".", "3", ".", "23a" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2225-L2233
train
237,255
phaethon/kamene
kamene/contrib/gsm_um.py
startDtmf
def startDtmf(): """START DTMF Section 9.3.24""" a = TpPd(pd=0x3) b = MessageType(mesType=0x35) # 00110101 c = KeypadFacilityHdr(ieiKF=0x2C, eightBitKF=0x0) packet = a / b / c return packet
python
def startDtmf(): """START DTMF Section 9.3.24""" a = TpPd(pd=0x3) b = MessageType(mesType=0x35) # 00110101 c = KeypadFacilityHdr(ieiKF=0x2C, eightBitKF=0x0) packet = a / b / c return packet
[ "def", "startDtmf", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x35", ")", "# 00110101", "c", "=", "KeypadFacilityHdr", "(", "ieiKF", "=", "0x2C", ",", "eightBitKF", "=", "0x0", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
START DTMF Section 9.3.24
[ "START", "DTMF", "Section", "9", ".", "3", ".", "24" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2236-L2242
train
237,256
phaethon/kamene
kamene/contrib/gsm_um.py
startDtmfReject
def startDtmfReject(): """ START DTMF REJECT Section 9.3.26""" a = TpPd(pd=0x3) b = MessageType(mesType=0x37) # 00110111 c = Cause() packet = a / b / c return packet
python
def startDtmfReject(): """ START DTMF REJECT Section 9.3.26""" a = TpPd(pd=0x3) b = MessageType(mesType=0x37) # 00110111 c = Cause() packet = a / b / c return packet
[ "def", "startDtmfReject", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x37", ")", "# 00110111", "c", "=", "Cause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
START DTMF REJECT Section 9.3.26
[ "START", "DTMF", "REJECT", "Section", "9", ".", "3", ".", "26" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2256-L2262
train
237,257
phaethon/kamene
kamene/contrib/gsm_um.py
status
def status(AuxiliaryStates_presence=0): """STATUS Section 9.3.27""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3d) # 00111101 c = Cause() d = CallState() packet = a / b / c / d if AuxiliaryStates_presence is 1: e = AuxiliaryStatesHdr(ieiAS=0x24, eightBitAS=0x0) packet = packet / e return packet
python
def status(AuxiliaryStates_presence=0): """STATUS Section 9.3.27""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3d) # 00111101 c = Cause() d = CallState() packet = a / b / c / d if AuxiliaryStates_presence is 1: e = AuxiliaryStatesHdr(ieiAS=0x24, eightBitAS=0x0) packet = packet / e return packet
[ "def", "status", "(", "AuxiliaryStates_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3d", ")", "# 00111101", "c", "=", "Cause", "(", ")", "d", "=", "CallState", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "if", "AuxiliaryStates_presence", "is", "1", ":", "e", "=", "AuxiliaryStatesHdr", "(", "ieiAS", "=", "0x24", ",", "eightBitAS", "=", "0x0", ")", "packet", "=", "packet", "/", "e", "return", "packet" ]
STATUS Section 9.3.27
[ "STATUS", "Section", "9", ".", "3", ".", "27" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2265-L2275
train
237,258
phaethon/kamene
kamene/contrib/gsm_um.py
statusEnquiry
def statusEnquiry(): """STATUS ENQUIRY Section 9.3.28""" a = TpPd(pd=0x3) b = MessageType(mesType=0x34) # 00110100 packet = a / b return packet
python
def statusEnquiry(): """STATUS ENQUIRY Section 9.3.28""" a = TpPd(pd=0x3) b = MessageType(mesType=0x34) # 00110100 packet = a / b return packet
[ "def", "statusEnquiry", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x34", ")", "# 00110100", "packet", "=", "a", "/", "b", "return", "packet" ]
STATUS ENQUIRY Section 9.3.28
[ "STATUS", "ENQUIRY", "Section", "9", ".", "3", ".", "28" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2278-L2283
train
237,259
phaethon/kamene
kamene/contrib/gsm_um.py
stopDtmf
def stopDtmf(): """STOP DTMF Section 9.3.29""" a = TpPd(pd=0x3) b = MessageType(mesType=0x31) # 00110001 packet = a / b return packet
python
def stopDtmf(): """STOP DTMF Section 9.3.29""" a = TpPd(pd=0x3) b = MessageType(mesType=0x31) # 00110001 packet = a / b return packet
[ "def", "stopDtmf", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x31", ")", "# 00110001", "packet", "=", "a", "/", "b", "return", "packet" ]
STOP DTMF Section 9.3.29
[ "STOP", "DTMF", "Section", "9", ".", "3", ".", "29" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2286-L2291
train
237,260
phaethon/kamene
kamene/contrib/gsm_um.py
stopDtmfAcknowledge
def stopDtmfAcknowledge(): """STOP DTMF ACKNOWLEDGE Section 9.3.30""" a = TpPd(pd=0x3) b = MessageType(mesType=0x32) # 00110010 packet = a / b return packet
python
def stopDtmfAcknowledge(): """STOP DTMF ACKNOWLEDGE Section 9.3.30""" a = TpPd(pd=0x3) b = MessageType(mesType=0x32) # 00110010 packet = a / b return packet
[ "def", "stopDtmfAcknowledge", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x32", ")", "# 00110010", "packet", "=", "a", "/", "b", "return", "packet" ]
STOP DTMF ACKNOWLEDGE Section 9.3.30
[ "STOP", "DTMF", "ACKNOWLEDGE", "Section", "9", ".", "3", ".", "30" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2295-L2300
train
237,261
phaethon/kamene
kamene/contrib/gsm_um.py
userInformation
def userInformation(MoreData_presence=0): """USER INFORMATION Section 9.3.31""" a = TpPd(pd=0x3) b = MessageType(mesType=0x20) # 000100000 c = UserUser() packet = a / b / c if MoreData_presence is 1: d = MoreDataHdr(ieiMD=0xA0, eightBitMD=0x0) packet = packet / d return packet
python
def userInformation(MoreData_presence=0): """USER INFORMATION Section 9.3.31""" a = TpPd(pd=0x3) b = MessageType(mesType=0x20) # 000100000 c = UserUser() packet = a / b / c if MoreData_presence is 1: d = MoreDataHdr(ieiMD=0xA0, eightBitMD=0x0) packet = packet / d return packet
[ "def", "userInformation", "(", "MoreData_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x20", ")", "# 000100000", "c", "=", "UserUser", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "MoreData_presence", "is", "1", ":", "d", "=", "MoreDataHdr", "(", "ieiMD", "=", "0xA0", ",", "eightBitMD", "=", "0x0", ")", "packet", "=", "packet", "/", "d", "return", "packet" ]
USER INFORMATION Section 9.3.31
[ "USER", "INFORMATION", "Section", "9", ".", "3", ".", "31" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2303-L2312
train
237,262
phaethon/kamene
kamene/contrib/gsm_um.py
attachRequest
def attachRequest(PTmsiSignature_presence=0, GprsTimer_presence=0, TmsiStatus_presence=0): """ATTACH REQUEST Section 9.4.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1) # 0000001 c = MsNetworkCapability() d = AttachTypeAndCiphKeySeqNr() f = DrxParameter() g = MobileId() h = RoutingAreaIdentification() i = MsRadioAccessCapability() packet = a / b / c / d / f / g / h / i if PTmsiSignature_presence is 1: j = PTmsiSignature(ieiPTS=0x19) packet = packet / j if GprsTimer_presence is 1: k = GprsTimer(ieiGT=0x17) packet = packet / k if TmsiStatus_presence is 1: l = TmsiStatus(ieiTS=0x9) packet = packet / l return packet
python
def attachRequest(PTmsiSignature_presence=0, GprsTimer_presence=0, TmsiStatus_presence=0): """ATTACH REQUEST Section 9.4.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x1) # 0000001 c = MsNetworkCapability() d = AttachTypeAndCiphKeySeqNr() f = DrxParameter() g = MobileId() h = RoutingAreaIdentification() i = MsRadioAccessCapability() packet = a / b / c / d / f / g / h / i if PTmsiSignature_presence is 1: j = PTmsiSignature(ieiPTS=0x19) packet = packet / j if GprsTimer_presence is 1: k = GprsTimer(ieiGT=0x17) packet = packet / k if TmsiStatus_presence is 1: l = TmsiStatus(ieiTS=0x9) packet = packet / l return packet
[ "def", "attachRequest", "(", "PTmsiSignature_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ",", "TmsiStatus_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x1", ")", "# 0000001", "c", "=", "MsNetworkCapability", "(", ")", "d", "=", "AttachTypeAndCiphKeySeqNr", "(", ")", "f", "=", "DrxParameter", "(", ")", "g", "=", "MobileId", "(", ")", "h", "=", "RoutingAreaIdentification", "(", ")", "i", "=", "MsRadioAccessCapability", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "f", "/", "g", "/", "h", "/", "i", "if", "PTmsiSignature_presence", "is", "1", ":", "j", "=", "PTmsiSignature", "(", "ieiPTS", "=", "0x19", ")", "packet", "=", "packet", "/", "j", "if", "GprsTimer_presence", "is", "1", ":", "k", "=", "GprsTimer", "(", "ieiGT", "=", "0x17", ")", "packet", "=", "packet", "/", "k", "if", "TmsiStatus_presence", "is", "1", ":", "l", "=", "TmsiStatus", "(", "ieiTS", "=", "0x9", ")", "packet", "=", "packet", "/", "l", "return", "packet" ]
ATTACH REQUEST Section 9.4.1
[ "ATTACH", "REQUEST", "Section", "9", ".", "4", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2319-L2340
train
237,263
phaethon/kamene
kamene/contrib/gsm_um.py
attachAccept
def attachAccept(PTmsiSignature_presence=0, GprsTimer_presence=0, MobileId_presence=0, MobileId_presence1=0, GmmCause_presence=0): """ATTACH ACCEPT Section 9.4.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2) # 00000010 c = AttachResult() d = ForceToStandby() e = GprsTimer() f = RadioPriorityAndSpareHalfOctets() h = RoutingAreaIdentification() packet = a / b / c / d / e / f / h if PTmsiSignature_presence is 1: i = PTmsiSignature(ieiPTS=0x19) packet = packet / i if GprsTimer_presence is 1: j = GprsTimer(ieiGT=0x17) packet = packet / j if MobileId_presence is 1: k = MobileIdHdr(ieiMI=0x18, eightBitMI=0x0) packet = packet / k if MobileId_presence1 is 1: l = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / l if GmmCause_presence is 1: m = GmmCause(ieiGC=0x25) packet = packet / m return packet
python
def attachAccept(PTmsiSignature_presence=0, GprsTimer_presence=0, MobileId_presence=0, MobileId_presence1=0, GmmCause_presence=0): """ATTACH ACCEPT Section 9.4.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x2) # 00000010 c = AttachResult() d = ForceToStandby() e = GprsTimer() f = RadioPriorityAndSpareHalfOctets() h = RoutingAreaIdentification() packet = a / b / c / d / e / f / h if PTmsiSignature_presence is 1: i = PTmsiSignature(ieiPTS=0x19) packet = packet / i if GprsTimer_presence is 1: j = GprsTimer(ieiGT=0x17) packet = packet / j if MobileId_presence is 1: k = MobileIdHdr(ieiMI=0x18, eightBitMI=0x0) packet = packet / k if MobileId_presence1 is 1: l = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / l if GmmCause_presence is 1: m = GmmCause(ieiGC=0x25) packet = packet / m return packet
[ "def", "attachAccept", "(", "PTmsiSignature_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ",", "MobileId_presence", "=", "0", ",", "MobileId_presence1", "=", "0", ",", "GmmCause_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x2", ")", "# 00000010", "c", "=", "AttachResult", "(", ")", "d", "=", "ForceToStandby", "(", ")", "e", "=", "GprsTimer", "(", ")", "f", "=", "RadioPriorityAndSpareHalfOctets", "(", ")", "h", "=", "RoutingAreaIdentification", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "/", "f", "/", "h", "if", "PTmsiSignature_presence", "is", "1", ":", "i", "=", "PTmsiSignature", "(", "ieiPTS", "=", "0x19", ")", "packet", "=", "packet", "/", "i", "if", "GprsTimer_presence", "is", "1", ":", "j", "=", "GprsTimer", "(", "ieiGT", "=", "0x17", ")", "packet", "=", "packet", "/", "j", "if", "MobileId_presence", "is", "1", ":", "k", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x18", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "k", "if", "MobileId_presence1", "is", "1", ":", "l", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x23", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "l", "if", "GmmCause_presence", "is", "1", ":", "m", "=", "GmmCause", "(", "ieiGC", "=", "0x25", ")", "packet", "=", "packet", "/", "m", "return", "packet" ]
ATTACH ACCEPT Section 9.4.2
[ "ATTACH", "ACCEPT", "Section", "9", ".", "4", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2343-L2370
train
237,264
phaethon/kamene
kamene/contrib/gsm_um.py
attachComplete
def attachComplete(): """ATTACH COMPLETE Section 9.4.3""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3) # 00000011 packet = a / b return packet
python
def attachComplete(): """ATTACH COMPLETE Section 9.4.3""" a = TpPd(pd=0x3) b = MessageType(mesType=0x3) # 00000011 packet = a / b return packet
[ "def", "attachComplete", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x3", ")", "# 00000011", "packet", "=", "a", "/", "b", "return", "packet" ]
ATTACH COMPLETE Section 9.4.3
[ "ATTACH", "COMPLETE", "Section", "9", ".", "4", ".", "3" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2373-L2378
train
237,265
phaethon/kamene
kamene/contrib/gsm_um.py
detachRequest
def detachRequest(GmmCause_presence=0): """DETACH REQUEST Section 9.4.5""" a = TpPd(pd=0x3) b = MessageType(mesType=0x5) # 00000101 c = DetachTypeAndForceToStandby() packet = a / b / c if GmmCause_presence is 1: e = GmmCause(ieiGC=0x25) packet = packet / e return packet
python
def detachRequest(GmmCause_presence=0): """DETACH REQUEST Section 9.4.5""" a = TpPd(pd=0x3) b = MessageType(mesType=0x5) # 00000101 c = DetachTypeAndForceToStandby() packet = a / b / c if GmmCause_presence is 1: e = GmmCause(ieiGC=0x25) packet = packet / e return packet
[ "def", "detachRequest", "(", "GmmCause_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x5", ")", "# 00000101", "c", "=", "DetachTypeAndForceToStandby", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "GmmCause_presence", "is", "1", ":", "e", "=", "GmmCause", "(", "ieiGC", "=", "0x25", ")", "packet", "=", "packet", "/", "e", "return", "packet" ]
DETACH REQUEST Section 9.4.5
[ "DETACH", "REQUEST", "Section", "9", ".", "4", ".", "5" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2390-L2399
train
237,266
phaethon/kamene
kamene/contrib/gsm_um.py
detachRequestMsOriginating
def detachRequestMsOriginating(): """DETACH REQUEST Section 9.4.5.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x5) # 00000101 c = DetachTypeAndSpareHalfOctets() packet = a / b / c return packet
python
def detachRequestMsOriginating(): """DETACH REQUEST Section 9.4.5.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x5) # 00000101 c = DetachTypeAndSpareHalfOctets() packet = a / b / c return packet
[ "def", "detachRequestMsOriginating", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x5", ")", "# 00000101", "c", "=", "DetachTypeAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
DETACH REQUEST Section 9.4.5.2
[ "DETACH", "REQUEST", "Section", "9", ".", "4", ".", "5", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2402-L2408
train
237,267
phaethon/kamene
kamene/contrib/gsm_um.py
detachAcceptMsTerminated
def detachAcceptMsTerminated(): """DETACH ACCEPT Section 9.4.6.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 packet = a / b return packet
python
def detachAcceptMsTerminated(): """DETACH ACCEPT Section 9.4.6.1""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 packet = a / b return packet
[ "def", "detachAcceptMsTerminated", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x6", ")", "# 00000110", "packet", "=", "a", "/", "b", "return", "packet" ]
DETACH ACCEPT Section 9.4.6.1
[ "DETACH", "ACCEPT", "Section", "9", ".", "4", ".", "6", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2411-L2416
train
237,268
phaethon/kamene
kamene/contrib/gsm_um.py
detachAcceptMsOriginating
def detachAcceptMsOriginating(): """DETACH ACCEPT Section 9.4.6.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 c = ForceToStandbyAndSpareHalfOctets() packet = a / b / c return packet
python
def detachAcceptMsOriginating(): """DETACH ACCEPT Section 9.4.6.2""" a = TpPd(pd=0x3) b = MessageType(mesType=0x6) # 00000110 c = ForceToStandbyAndSpareHalfOctets() packet = a / b / c return packet
[ "def", "detachAcceptMsOriginating", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x6", ")", "# 00000110", "c", "=", "ForceToStandbyAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
DETACH ACCEPT Section 9.4.6.2
[ "DETACH", "ACCEPT", "Section", "9", ".", "4", ".", "6", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2419-L2425
train
237,269
phaethon/kamene
kamene/contrib/gsm_um.py
ptmsiReallocationCommand
def ptmsiReallocationCommand(PTmsiSignature_presence=0): """P-TMSI REALLOCATION COMMAND Section 9.4.7""" a = TpPd(pd=0x3) b = MessageType(mesType=0x10) # 00010000 c = MobileId() d = RoutingAreaIdentification() e = ForceToStandbyAndSpareHalfOctets() packet = a / b / c / d / e if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g return packet
python
def ptmsiReallocationCommand(PTmsiSignature_presence=0): """P-TMSI REALLOCATION COMMAND Section 9.4.7""" a = TpPd(pd=0x3) b = MessageType(mesType=0x10) # 00010000 c = MobileId() d = RoutingAreaIdentification() e = ForceToStandbyAndSpareHalfOctets() packet = a / b / c / d / e if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g return packet
[ "def", "ptmsiReallocationCommand", "(", "PTmsiSignature_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x10", ")", "# 00010000", "c", "=", "MobileId", "(", ")", "d", "=", "RoutingAreaIdentification", "(", ")", "e", "=", "ForceToStandbyAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "if", "PTmsiSignature_presence", "is", "1", ":", "g", "=", "PTmsiSignature", "(", "ieiPTS", "=", "0x19", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
P-TMSI REALLOCATION COMMAND Section 9.4.7
[ "P", "-", "TMSI", "REALLOCATION", "COMMAND", "Section", "9", ".", "4", ".", "7" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2428-L2439
train
237,270
phaethon/kamene
kamene/contrib/gsm_um.py
ptmsiReallocationComplete
def ptmsiReallocationComplete(): """P-TMSI REALLOCATION COMPLETE Section 9.4.8""" a = TpPd(pd=0x3) b = MessageType(mesType=0x11) # 00010001 packet = a / b return packet
python
def ptmsiReallocationComplete(): """P-TMSI REALLOCATION COMPLETE Section 9.4.8""" a = TpPd(pd=0x3) b = MessageType(mesType=0x11) # 00010001 packet = a / b return packet
[ "def", "ptmsiReallocationComplete", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x11", ")", "# 00010001", "packet", "=", "a", "/", "b", "return", "packet" ]
P-TMSI REALLOCATION COMPLETE Section 9.4.8
[ "P", "-", "TMSI", "REALLOCATION", "COMPLETE", "Section", "9", ".", "4", ".", "8" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2442-L2447
train
237,271
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationAndCipheringRequest
def authenticationAndCipheringRequest( AuthenticationParameterRAND_presence=0, CiphKeySeqNr_presence=0): """AUTHENTICATION AND CIPHERING REQUEST Section 9.4.9""" a = TpPd(pd=0x3) b = MessageType(mesType=0x12) # 00010010 d = CipheringAlgorithmAndImeisvRequest() e = ForceToStandbyAndAcReferenceNumber() packet = a / b / d / e if AuthenticationParameterRAND_presence is 1: g = AuthenticationParameterRAND(ieiAPR=0x21) packet = packet / g if CiphKeySeqNr_presence is 1: h = CiphKeySeqNrHdr(ieiCKSN=0x08, eightBitCKSN=0x0) packet = packet / h return packet
python
def authenticationAndCipheringRequest( AuthenticationParameterRAND_presence=0, CiphKeySeqNr_presence=0): """AUTHENTICATION AND CIPHERING REQUEST Section 9.4.9""" a = TpPd(pd=0x3) b = MessageType(mesType=0x12) # 00010010 d = CipheringAlgorithmAndImeisvRequest() e = ForceToStandbyAndAcReferenceNumber() packet = a / b / d / e if AuthenticationParameterRAND_presence is 1: g = AuthenticationParameterRAND(ieiAPR=0x21) packet = packet / g if CiphKeySeqNr_presence is 1: h = CiphKeySeqNrHdr(ieiCKSN=0x08, eightBitCKSN=0x0) packet = packet / h return packet
[ "def", "authenticationAndCipheringRequest", "(", "AuthenticationParameterRAND_presence", "=", "0", ",", "CiphKeySeqNr_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x12", ")", "# 00010010", "d", "=", "CipheringAlgorithmAndImeisvRequest", "(", ")", "e", "=", "ForceToStandbyAndAcReferenceNumber", "(", ")", "packet", "=", "a", "/", "b", "/", "d", "/", "e", "if", "AuthenticationParameterRAND_presence", "is", "1", ":", "g", "=", "AuthenticationParameterRAND", "(", "ieiAPR", "=", "0x21", ")", "packet", "=", "packet", "/", "g", "if", "CiphKeySeqNr_presence", "is", "1", ":", "h", "=", "CiphKeySeqNrHdr", "(", "ieiCKSN", "=", "0x08", ",", "eightBitCKSN", "=", "0x0", ")", "packet", "=", "packet", "/", "h", "return", "packet" ]
AUTHENTICATION AND CIPHERING REQUEST Section 9.4.9
[ "AUTHENTICATION", "AND", "CIPHERING", "REQUEST", "Section", "9", ".", "4", ".", "9" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2450-L2465
train
237,272
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationAndCipheringResponse
def authenticationAndCipheringResponse( AuthenticationParameterSRES_presence=0, MobileId_presence=0): """AUTHENTICATION AND CIPHERING RESPONSE Section 9.4.10""" a = TpPd(pd=0x3) b = MessageType(mesType=0x13) # 00010011 c = AcReferenceNumberAndSpareHalfOctets() packet = a / b / c if AuthenticationParameterSRES_presence is 1: e = AuthenticationParameterSRES(ieiAPS=0x22) packet = packet / e if MobileId_presence is 1: f = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / f return packet
python
def authenticationAndCipheringResponse( AuthenticationParameterSRES_presence=0, MobileId_presence=0): """AUTHENTICATION AND CIPHERING RESPONSE Section 9.4.10""" a = TpPd(pd=0x3) b = MessageType(mesType=0x13) # 00010011 c = AcReferenceNumberAndSpareHalfOctets() packet = a / b / c if AuthenticationParameterSRES_presence is 1: e = AuthenticationParameterSRES(ieiAPS=0x22) packet = packet / e if MobileId_presence is 1: f = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / f return packet
[ "def", "authenticationAndCipheringResponse", "(", "AuthenticationParameterSRES_presence", "=", "0", ",", "MobileId_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x13", ")", "# 00010011", "c", "=", "AcReferenceNumberAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "AuthenticationParameterSRES_presence", "is", "1", ":", "e", "=", "AuthenticationParameterSRES", "(", "ieiAPS", "=", "0x22", ")", "packet", "=", "packet", "/", "e", "if", "MobileId_presence", "is", "1", ":", "f", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x23", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "f", "return", "packet" ]
AUTHENTICATION AND CIPHERING RESPONSE Section 9.4.10
[ "AUTHENTICATION", "AND", "CIPHERING", "RESPONSE", "Section", "9", ".", "4", ".", "10" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2468-L2482
train
237,273
phaethon/kamene
kamene/contrib/gsm_um.py
authenticationAndCipheringReject
def authenticationAndCipheringReject(): """AUTHENTICATION AND CIPHERING REJECT Section 9.4.11""" a = TpPd(pd=0x3) b = MessageType(mesType=0x14) # 00010100 packet = a / b return packet
python
def authenticationAndCipheringReject(): """AUTHENTICATION AND CIPHERING REJECT Section 9.4.11""" a = TpPd(pd=0x3) b = MessageType(mesType=0x14) # 00010100 packet = a / b return packet
[ "def", "authenticationAndCipheringReject", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x14", ")", "# 00010100", "packet", "=", "a", "/", "b", "return", "packet" ]
AUTHENTICATION AND CIPHERING REJECT Section 9.4.11
[ "AUTHENTICATION", "AND", "CIPHERING", "REJECT", "Section", "9", ".", "4", ".", "11" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2485-L2490
train
237,274
phaethon/kamene
kamene/contrib/gsm_um.py
routingAreaUpdateRequest
def routingAreaUpdateRequest(PTmsiSignature_presence=0, GprsTimer_presence=0, DrxParameter_presence=0, TmsiStatus_presence=0): """ROUTING AREA UPDATE REQUEST Section 9.4.14""" a = TpPd(pd=0x3) b = MessageType(mesType=0x8) # 00001000 c = UpdateTypeAndCiphKeySeqNr() e = RoutingAreaIdentification() f = MsNetworkCapability() packet = a / b / c / e / f if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g if GprsTimer_presence is 1: h = GprsTimer(ieiGT=0x17) packet = packet / h if DrxParameter_presence is 1: i = DrxParameter(ieiDP=0x27) packet = packet / i if TmsiStatus_presence is 1: j = TmsiStatus(ieiTS=0x9) packet = packet / j return packet
python
def routingAreaUpdateRequest(PTmsiSignature_presence=0, GprsTimer_presence=0, DrxParameter_presence=0, TmsiStatus_presence=0): """ROUTING AREA UPDATE REQUEST Section 9.4.14""" a = TpPd(pd=0x3) b = MessageType(mesType=0x8) # 00001000 c = UpdateTypeAndCiphKeySeqNr() e = RoutingAreaIdentification() f = MsNetworkCapability() packet = a / b / c / e / f if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g if GprsTimer_presence is 1: h = GprsTimer(ieiGT=0x17) packet = packet / h if DrxParameter_presence is 1: i = DrxParameter(ieiDP=0x27) packet = packet / i if TmsiStatus_presence is 1: j = TmsiStatus(ieiTS=0x9) packet = packet / j return packet
[ "def", "routingAreaUpdateRequest", "(", "PTmsiSignature_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ",", "DrxParameter_presence", "=", "0", ",", "TmsiStatus_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x8", ")", "# 00001000", "c", "=", "UpdateTypeAndCiphKeySeqNr", "(", ")", "e", "=", "RoutingAreaIdentification", "(", ")", "f", "=", "MsNetworkCapability", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "/", "f", "if", "PTmsiSignature_presence", "is", "1", ":", "g", "=", "PTmsiSignature", "(", "ieiPTS", "=", "0x19", ")", "packet", "=", "packet", "/", "g", "if", "GprsTimer_presence", "is", "1", ":", "h", "=", "GprsTimer", "(", "ieiGT", "=", "0x17", ")", "packet", "=", "packet", "/", "h", "if", "DrxParameter_presence", "is", "1", ":", "i", "=", "DrxParameter", "(", "ieiDP", "=", "0x27", ")", "packet", "=", "packet", "/", "i", "if", "TmsiStatus_presence", "is", "1", ":", "j", "=", "TmsiStatus", "(", "ieiTS", "=", "0x9", ")", "packet", "=", "packet", "/", "j", "return", "packet" ]
ROUTING AREA UPDATE REQUEST Section 9.4.14
[ "ROUTING", "AREA", "UPDATE", "REQUEST", "Section", "9", ".", "4", ".", "14" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2511-L2534
train
237,275
phaethon/kamene
kamene/contrib/gsm_um.py
routingAreaUpdateAccept
def routingAreaUpdateAccept(PTmsiSignature_presence=0, MobileId_presence=0, MobileId_presence1=0, ReceiveNpduNumbersList_presence=0, GprsTimer_presence=0, GmmCause_presence=0): """ROUTING AREA UPDATE ACCEPT Section 9.4.15""" a = TpPd(pd=0x3) b = MessageType(mesType=0x9) # 00001001 c = ForceToStandbyAndUpdateResult() e = GprsTimer() f = RoutingAreaIdentification() packet = a / b / c / e / f if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g if MobileId_presence is 1: h = MobileIdHdr(ieiMI=0x18, eightBitMI=0x0) packet = packet / h if MobileId_presence1 is 1: i = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / i if ReceiveNpduNumbersList_presence is 1: j = ReceiveNpduNumbersList(ieiRNNL=0x26) packet = packet / j if GprsTimer_presence is 1: k = GprsTimer(ieiGT=0x17) packet = packet / k if GmmCause_presence is 1: l = GmmCause(ieiGC=0x25) packet = packet / l return packet
python
def routingAreaUpdateAccept(PTmsiSignature_presence=0, MobileId_presence=0, MobileId_presence1=0, ReceiveNpduNumbersList_presence=0, GprsTimer_presence=0, GmmCause_presence=0): """ROUTING AREA UPDATE ACCEPT Section 9.4.15""" a = TpPd(pd=0x3) b = MessageType(mesType=0x9) # 00001001 c = ForceToStandbyAndUpdateResult() e = GprsTimer() f = RoutingAreaIdentification() packet = a / b / c / e / f if PTmsiSignature_presence is 1: g = PTmsiSignature(ieiPTS=0x19) packet = packet / g if MobileId_presence is 1: h = MobileIdHdr(ieiMI=0x18, eightBitMI=0x0) packet = packet / h if MobileId_presence1 is 1: i = MobileIdHdr(ieiMI=0x23, eightBitMI=0x0) packet = packet / i if ReceiveNpduNumbersList_presence is 1: j = ReceiveNpduNumbersList(ieiRNNL=0x26) packet = packet / j if GprsTimer_presence is 1: k = GprsTimer(ieiGT=0x17) packet = packet / k if GmmCause_presence is 1: l = GmmCause(ieiGC=0x25) packet = packet / l return packet
[ "def", "routingAreaUpdateAccept", "(", "PTmsiSignature_presence", "=", "0", ",", "MobileId_presence", "=", "0", ",", "MobileId_presence1", "=", "0", ",", "ReceiveNpduNumbersList_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ",", "GmmCause_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x9", ")", "# 00001001", "c", "=", "ForceToStandbyAndUpdateResult", "(", ")", "e", "=", "GprsTimer", "(", ")", "f", "=", "RoutingAreaIdentification", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "e", "/", "f", "if", "PTmsiSignature_presence", "is", "1", ":", "g", "=", "PTmsiSignature", "(", "ieiPTS", "=", "0x19", ")", "packet", "=", "packet", "/", "g", "if", "MobileId_presence", "is", "1", ":", "h", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x18", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "h", "if", "MobileId_presence1", "is", "1", ":", "i", "=", "MobileIdHdr", "(", "ieiMI", "=", "0x23", ",", "eightBitMI", "=", "0x0", ")", "packet", "=", "packet", "/", "i", "if", "ReceiveNpduNumbersList_presence", "is", "1", ":", "j", "=", "ReceiveNpduNumbersList", "(", "ieiRNNL", "=", "0x26", ")", "packet", "=", "packet", "/", "j", "if", "GprsTimer_presence", "is", "1", ":", "k", "=", "GprsTimer", "(", "ieiGT", "=", "0x17", ")", "packet", "=", "packet", "/", "k", "if", "GmmCause_presence", "is", "1", ":", "l", "=", "GmmCause", "(", "ieiGC", "=", "0x25", ")", "packet", "=", "packet", "/", "l", "return", "packet" ]
ROUTING AREA UPDATE ACCEPT Section 9.4.15
[ "ROUTING", "AREA", "UPDATE", "ACCEPT", "Section", "9", ".", "4", ".", "15" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2537-L2566
train
237,276
phaethon/kamene
kamene/contrib/gsm_um.py
routingAreaUpdateComplete
def routingAreaUpdateComplete(ReceiveNpduNumbersList_presence=0): """ROUTING AREA UPDATE COMPLETE Section 9.4.16""" a = TpPd(pd=0x3) b = MessageType(mesType=0xa) # 00001010 packet = a / b if ReceiveNpduNumbersList_presence is 1: c = ReceiveNpduNumbersList(ieiRNNL=0x26) packet = packet / c return packet
python
def routingAreaUpdateComplete(ReceiveNpduNumbersList_presence=0): """ROUTING AREA UPDATE COMPLETE Section 9.4.16""" a = TpPd(pd=0x3) b = MessageType(mesType=0xa) # 00001010 packet = a / b if ReceiveNpduNumbersList_presence is 1: c = ReceiveNpduNumbersList(ieiRNNL=0x26) packet = packet / c return packet
[ "def", "routingAreaUpdateComplete", "(", "ReceiveNpduNumbersList_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0xa", ")", "# 00001010", "packet", "=", "a", "/", "b", "if", "ReceiveNpduNumbersList_presence", "is", "1", ":", "c", "=", "ReceiveNpduNumbersList", "(", "ieiRNNL", "=", "0x26", ")", "packet", "=", "packet", "/", "c", "return", "packet" ]
ROUTING AREA UPDATE COMPLETE Section 9.4.16
[ "ROUTING", "AREA", "UPDATE", "COMPLETE", "Section", "9", ".", "4", ".", "16" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2569-L2577
train
237,277
phaethon/kamene
kamene/contrib/gsm_um.py
routingAreaUpdateReject
def routingAreaUpdateReject(): """ROUTING AREA UPDATE REJECT Section 9.4.17""" a = TpPd(pd=0x3) b = MessageType(mesType=0xb) # 00001011 c = GmmCause() d = ForceToStandbyAndSpareHalfOctets() packet = a / b / c / d return packet
python
def routingAreaUpdateReject(): """ROUTING AREA UPDATE REJECT Section 9.4.17""" a = TpPd(pd=0x3) b = MessageType(mesType=0xb) # 00001011 c = GmmCause() d = ForceToStandbyAndSpareHalfOctets() packet = a / b / c / d return packet
[ "def", "routingAreaUpdateReject", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0xb", ")", "# 00001011", "c", "=", "GmmCause", "(", ")", "d", "=", "ForceToStandbyAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "return", "packet" ]
ROUTING AREA UPDATE REJECT Section 9.4.17
[ "ROUTING", "AREA", "UPDATE", "REJECT", "Section", "9", ".", "4", ".", "17" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2580-L2587
train
237,278
phaethon/kamene
kamene/contrib/gsm_um.py
gmmStatus
def gmmStatus(): """GMM STATUS Section 9.4.18""" a = TpPd(pd=0x3) b = MessageType(mesType=0x20) # 00100000 c = GmmCause() packet = a / b / c return packet
python
def gmmStatus(): """GMM STATUS Section 9.4.18""" a = TpPd(pd=0x3) b = MessageType(mesType=0x20) # 00100000 c = GmmCause() packet = a / b / c return packet
[ "def", "gmmStatus", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x3", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x20", ")", "# 00100000", "c", "=", "GmmCause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
GMM STATUS Section 9.4.18
[ "GMM", "STATUS", "Section", "9", ".", "4", ".", "18" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2590-L2596
train
237,279
phaethon/kamene
kamene/contrib/gsm_um.py
activatePdpContextRequest
def activatePdpContextRequest(AccessPointName_presence=0, ProtocolConfigurationOptions_presence=0): """ACTIVATE PDP CONTEXT REQUEST Section 9.5.1""" a = TpPd(pd=0x8) b = MessageType(mesType=0x41) # 01000001 c = NetworkServiceAccessPointIdentifier() d = LlcServiceAccessPointIdentifier() e = QualityOfService() f = PacketDataProtocolAddress() packet = a / b / c / d / e / f if AccessPointName_presence is 1: g = AccessPointName(ieiAPN=0x28) packet = packet / g if ProtocolConfigurationOptions_presence is 1: h = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / h return packet
python
def activatePdpContextRequest(AccessPointName_presence=0, ProtocolConfigurationOptions_presence=0): """ACTIVATE PDP CONTEXT REQUEST Section 9.5.1""" a = TpPd(pd=0x8) b = MessageType(mesType=0x41) # 01000001 c = NetworkServiceAccessPointIdentifier() d = LlcServiceAccessPointIdentifier() e = QualityOfService() f = PacketDataProtocolAddress() packet = a / b / c / d / e / f if AccessPointName_presence is 1: g = AccessPointName(ieiAPN=0x28) packet = packet / g if ProtocolConfigurationOptions_presence is 1: h = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / h return packet
[ "def", "activatePdpContextRequest", "(", "AccessPointName_presence", "=", "0", ",", "ProtocolConfigurationOptions_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x41", ")", "# 01000001", "c", "=", "NetworkServiceAccessPointIdentifier", "(", ")", "d", "=", "LlcServiceAccessPointIdentifier", "(", ")", "e", "=", "QualityOfService", "(", ")", "f", "=", "PacketDataProtocolAddress", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "/", "f", "if", "AccessPointName_presence", "is", "1", ":", "g", "=", "AccessPointName", "(", "ieiAPN", "=", "0x28", ")", "packet", "=", "packet", "/", "g", "if", "ProtocolConfigurationOptions_presence", "is", "1", ":", "h", "=", "ProtocolConfigurationOptions", "(", "ieiPCO", "=", "0x27", ")", "packet", "=", "packet", "/", "h", "return", "packet" ]
ACTIVATE PDP CONTEXT REQUEST Section 9.5.1
[ "ACTIVATE", "PDP", "CONTEXT", "REQUEST", "Section", "9", ".", "5", ".", "1" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2628-L2644
train
237,280
phaethon/kamene
kamene/contrib/gsm_um.py
activatePdpContextAccept
def activatePdpContextAccept(PacketDataProtocolAddress_presence=0, ProtocolConfigurationOptions_presence=0): """ACTIVATE PDP CONTEXT ACCEPT Section 9.5.2""" a = TpPd(pd=0x8) b = MessageType(mesType=0x42) # 01000010 c = LlcServiceAccessPointIdentifier() d = QualityOfService() e = RadioPriorityAndSpareHalfOctets() packet = a / b / c / d / e if PacketDataProtocolAddress_presence is 1: f = PacketDataProtocolAddress(ieiPDPA=0x2B) packet = packet / f if ProtocolConfigurationOptions_presence is 1: g = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / g return packet
python
def activatePdpContextAccept(PacketDataProtocolAddress_presence=0, ProtocolConfigurationOptions_presence=0): """ACTIVATE PDP CONTEXT ACCEPT Section 9.5.2""" a = TpPd(pd=0x8) b = MessageType(mesType=0x42) # 01000010 c = LlcServiceAccessPointIdentifier() d = QualityOfService() e = RadioPriorityAndSpareHalfOctets() packet = a / b / c / d / e if PacketDataProtocolAddress_presence is 1: f = PacketDataProtocolAddress(ieiPDPA=0x2B) packet = packet / f if ProtocolConfigurationOptions_presence is 1: g = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / g return packet
[ "def", "activatePdpContextAccept", "(", "PacketDataProtocolAddress_presence", "=", "0", ",", "ProtocolConfigurationOptions_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x42", ")", "# 01000010", "c", "=", "LlcServiceAccessPointIdentifier", "(", ")", "d", "=", "QualityOfService", "(", ")", "e", "=", "RadioPriorityAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "if", "PacketDataProtocolAddress_presence", "is", "1", ":", "f", "=", "PacketDataProtocolAddress", "(", "ieiPDPA", "=", "0x2B", ")", "packet", "=", "packet", "/", "f", "if", "ProtocolConfigurationOptions_presence", "is", "1", ":", "g", "=", "ProtocolConfigurationOptions", "(", "ieiPCO", "=", "0x27", ")", "packet", "=", "packet", "/", "g", "return", "packet" ]
ACTIVATE PDP CONTEXT ACCEPT Section 9.5.2
[ "ACTIVATE", "PDP", "CONTEXT", "ACCEPT", "Section", "9", ".", "5", ".", "2" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2647-L2662
train
237,281
phaethon/kamene
kamene/contrib/gsm_um.py
requestPdpContextActivation
def requestPdpContextActivation(AccessPointName_presence=0): """REQUEST PDP CONTEXT ACTIVATION Section 9.5.4""" a = TpPd(pd=0x8) b = MessageType(mesType=0x44) # 01000100 c = PacketDataProtocolAddress() packet = a / b / c if AccessPointName_presence is 1: d = AccessPointName(ieiAPN=0x28) packet = packet / d return packet
python
def requestPdpContextActivation(AccessPointName_presence=0): """REQUEST PDP CONTEXT ACTIVATION Section 9.5.4""" a = TpPd(pd=0x8) b = MessageType(mesType=0x44) # 01000100 c = PacketDataProtocolAddress() packet = a / b / c if AccessPointName_presence is 1: d = AccessPointName(ieiAPN=0x28) packet = packet / d return packet
[ "def", "requestPdpContextActivation", "(", "AccessPointName_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x44", ")", "# 01000100", "c", "=", "PacketDataProtocolAddress", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "AccessPointName_presence", "is", "1", ":", "d", "=", "AccessPointName", "(", "ieiAPN", "=", "0x28", ")", "packet", "=", "packet", "/", "d", "return", "packet" ]
REQUEST PDP CONTEXT ACTIVATION Section 9.5.4
[ "REQUEST", "PDP", "CONTEXT", "ACTIVATION", "Section", "9", ".", "5", ".", "4" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2677-L2686
train
237,282
phaethon/kamene
kamene/contrib/gsm_um.py
requestPdpContextActivationReject
def requestPdpContextActivationReject(): """REQUEST PDP CONTEXT ACTIVATION REJECT Section 9.5.5""" a = TpPd(pd=0x8) b = MessageType(mesType=0x45) # 01000101 c = SmCause() packet = a / b / c return packet
python
def requestPdpContextActivationReject(): """REQUEST PDP CONTEXT ACTIVATION REJECT Section 9.5.5""" a = TpPd(pd=0x8) b = MessageType(mesType=0x45) # 01000101 c = SmCause() packet = a / b / c return packet
[ "def", "requestPdpContextActivationReject", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x45", ")", "# 01000101", "c", "=", "SmCause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
REQUEST PDP CONTEXT ACTIVATION REJECT Section 9.5.5
[ "REQUEST", "PDP", "CONTEXT", "ACTIVATION", "REJECT", "Section", "9", ".", "5", ".", "5" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2689-L2695
train
237,283
phaethon/kamene
kamene/contrib/gsm_um.py
modifyPdpContextRequest
def modifyPdpContextRequest(): """MODIFY PDP CONTEXT REQUEST Section 9.5.6""" a = TpPd(pd=0x8) b = MessageType(mesType=0x48) # 01001000 c = RadioPriorityAndSpareHalfOctets() d = LlcServiceAccessPointIdentifier() e = QualityOfService() packet = a / b / c / d / e return packet
python
def modifyPdpContextRequest(): """MODIFY PDP CONTEXT REQUEST Section 9.5.6""" a = TpPd(pd=0x8) b = MessageType(mesType=0x48) # 01001000 c = RadioPriorityAndSpareHalfOctets() d = LlcServiceAccessPointIdentifier() e = QualityOfService() packet = a / b / c / d / e return packet
[ "def", "modifyPdpContextRequest", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x48", ")", "# 01001000", "c", "=", "RadioPriorityAndSpareHalfOctets", "(", ")", "d", "=", "LlcServiceAccessPointIdentifier", "(", ")", "e", "=", "QualityOfService", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "return", "packet" ]
MODIFY PDP CONTEXT REQUEST Section 9.5.6
[ "MODIFY", "PDP", "CONTEXT", "REQUEST", "Section", "9", ".", "5", ".", "6" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2698-L2706
train
237,284
phaethon/kamene
kamene/contrib/gsm_um.py
modifyPdpContextAccept
def modifyPdpContextAccept(): """MODIFY PDP CONTEXT ACCEPT Section 9.5.7""" a = TpPd(pd=0x8) b = MessageType(mesType=0x45) # 01000101 packet = a / b return packet
python
def modifyPdpContextAccept(): """MODIFY PDP CONTEXT ACCEPT Section 9.5.7""" a = TpPd(pd=0x8) b = MessageType(mesType=0x45) # 01000101 packet = a / b return packet
[ "def", "modifyPdpContextAccept", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x45", ")", "# 01000101", "packet", "=", "a", "/", "b", "return", "packet" ]
MODIFY PDP CONTEXT ACCEPT Section 9.5.7
[ "MODIFY", "PDP", "CONTEXT", "ACCEPT", "Section", "9", ".", "5", ".", "7" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2709-L2714
train
237,285
phaethon/kamene
kamene/contrib/gsm_um.py
deactivatePdpContextAccept
def deactivatePdpContextAccept(): """DEACTIVATE PDP CONTEXT ACCEPT Section 9.5.9""" a = TpPd(pd=0x8) b = MessageType(mesType=0x47) # 01000111 packet = a / b return packet
python
def deactivatePdpContextAccept(): """DEACTIVATE PDP CONTEXT ACCEPT Section 9.5.9""" a = TpPd(pd=0x8) b = MessageType(mesType=0x47) # 01000111 packet = a / b return packet
[ "def", "deactivatePdpContextAccept", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x47", ")", "# 01000111", "packet", "=", "a", "/", "b", "return", "packet" ]
DEACTIVATE PDP CONTEXT ACCEPT Section 9.5.9
[ "DEACTIVATE", "PDP", "CONTEXT", "ACCEPT", "Section", "9", ".", "5", ".", "9" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2726-L2731
train
237,286
phaethon/kamene
kamene/contrib/gsm_um.py
activateAaPdpContextRequest
def activateAaPdpContextRequest(AccessPointName_presence=0, ProtocolConfigurationOptions_presence=0, GprsTimer_presence=0): """ACTIVATE AA PDP CONTEXT REQUEST Section 9.5.10""" a = TpPd(pd=0x8) b = MessageType(mesType=0x50) # 01010000 c = NetworkServiceAccessPointIdentifier() d = LlcServiceAccessPointIdentifier() e = QualityOfService() f = PacketDataProtocolAddress() packet = a / b / c / d / e / f if AccessPointName_presence is 1: g = AccessPointName(ieiAPN=0x28) packet = packet / g if ProtocolConfigurationOptions_presence is 1: h = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / h if GprsTimer_presence is 1: i = GprsTimer(ieiGT=0x29) packet = packet / i return packet
python
def activateAaPdpContextRequest(AccessPointName_presence=0, ProtocolConfigurationOptions_presence=0, GprsTimer_presence=0): """ACTIVATE AA PDP CONTEXT REQUEST Section 9.5.10""" a = TpPd(pd=0x8) b = MessageType(mesType=0x50) # 01010000 c = NetworkServiceAccessPointIdentifier() d = LlcServiceAccessPointIdentifier() e = QualityOfService() f = PacketDataProtocolAddress() packet = a / b / c / d / e / f if AccessPointName_presence is 1: g = AccessPointName(ieiAPN=0x28) packet = packet / g if ProtocolConfigurationOptions_presence is 1: h = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / h if GprsTimer_presence is 1: i = GprsTimer(ieiGT=0x29) packet = packet / i return packet
[ "def", "activateAaPdpContextRequest", "(", "AccessPointName_presence", "=", "0", ",", "ProtocolConfigurationOptions_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x50", ")", "# 01010000", "c", "=", "NetworkServiceAccessPointIdentifier", "(", ")", "d", "=", "LlcServiceAccessPointIdentifier", "(", ")", "e", "=", "QualityOfService", "(", ")", "f", "=", "PacketDataProtocolAddress", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "/", "f", "if", "AccessPointName_presence", "is", "1", ":", "g", "=", "AccessPointName", "(", "ieiAPN", "=", "0x28", ")", "packet", "=", "packet", "/", "g", "if", "ProtocolConfigurationOptions_presence", "is", "1", ":", "h", "=", "ProtocolConfigurationOptions", "(", "ieiPCO", "=", "0x27", ")", "packet", "=", "packet", "/", "h", "if", "GprsTimer_presence", "is", "1", ":", "i", "=", "GprsTimer", "(", "ieiGT", "=", "0x29", ")", "packet", "=", "packet", "/", "i", "return", "packet" ]
ACTIVATE AA PDP CONTEXT REQUEST Section 9.5.10
[ "ACTIVATE", "AA", "PDP", "CONTEXT", "REQUEST", "Section", "9", ".", "5", ".", "10" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2734-L2754
train
237,287
phaethon/kamene
kamene/contrib/gsm_um.py
activateAaPdpContextAccept
def activateAaPdpContextAccept(ProtocolConfigurationOptions_presence=0, GprsTimer_presence=0): """ACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.11""" a = TpPd(pd=0x8) b = MessageType(mesType=0x51) # 01010001 c = LlcServiceAccessPointIdentifier() d = QualityOfService() e = MobileId() f = PacketDataProtocolAddress() g = RadioPriorityAndSpareHalfOctets() packet = a / b / c / d / e / f / g if ProtocolConfigurationOptions_presence is 1: i = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / i if GprsTimer_presence is 1: j = GprsTimer(ieiGT=0x29) packet = packet / j return packet
python
def activateAaPdpContextAccept(ProtocolConfigurationOptions_presence=0, GprsTimer_presence=0): """ACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.11""" a = TpPd(pd=0x8) b = MessageType(mesType=0x51) # 01010001 c = LlcServiceAccessPointIdentifier() d = QualityOfService() e = MobileId() f = PacketDataProtocolAddress() g = RadioPriorityAndSpareHalfOctets() packet = a / b / c / d / e / f / g if ProtocolConfigurationOptions_presence is 1: i = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / i if GprsTimer_presence is 1: j = GprsTimer(ieiGT=0x29) packet = packet / j return packet
[ "def", "activateAaPdpContextAccept", "(", "ProtocolConfigurationOptions_presence", "=", "0", ",", "GprsTimer_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x51", ")", "# 01010001", "c", "=", "LlcServiceAccessPointIdentifier", "(", ")", "d", "=", "QualityOfService", "(", ")", "e", "=", "MobileId", "(", ")", "f", "=", "PacketDataProtocolAddress", "(", ")", "g", "=", "RadioPriorityAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "/", "d", "/", "e", "/", "f", "/", "g", "if", "ProtocolConfigurationOptions_presence", "is", "1", ":", "i", "=", "ProtocolConfigurationOptions", "(", "ieiPCO", "=", "0x27", ")", "packet", "=", "packet", "/", "i", "if", "GprsTimer_presence", "is", "1", ":", "j", "=", "GprsTimer", "(", "ieiGT", "=", "0x29", ")", "packet", "=", "packet", "/", "j", "return", "packet" ]
ACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.11
[ "ACTIVATE", "AA", "PDP", "CONTEXT", "ACCEPT", "Section", "9", ".", "5", ".", "11" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2757-L2774
train
237,288
phaethon/kamene
kamene/contrib/gsm_um.py
activateAaPdpContextReject
def activateAaPdpContextReject(ProtocolConfigurationOptions_presence=0): """ACTIVATE AA PDP CONTEXT REJECT Section 9.5.12""" a = TpPd(pd=0x8) b = MessageType(mesType=0x52) # 01010010 c = SmCause() packet = a / b / c if ProtocolConfigurationOptions_presence is 1: d = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / d return packet
python
def activateAaPdpContextReject(ProtocolConfigurationOptions_presence=0): """ACTIVATE AA PDP CONTEXT REJECT Section 9.5.12""" a = TpPd(pd=0x8) b = MessageType(mesType=0x52) # 01010010 c = SmCause() packet = a / b / c if ProtocolConfigurationOptions_presence is 1: d = ProtocolConfigurationOptions(ieiPCO=0x27) packet = packet / d return packet
[ "def", "activateAaPdpContextReject", "(", "ProtocolConfigurationOptions_presence", "=", "0", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x52", ")", "# 01010010", "c", "=", "SmCause", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "if", "ProtocolConfigurationOptions_presence", "is", "1", ":", "d", "=", "ProtocolConfigurationOptions", "(", "ieiPCO", "=", "0x27", ")", "packet", "=", "packet", "/", "d", "return", "packet" ]
ACTIVATE AA PDP CONTEXT REJECT Section 9.5.12
[ "ACTIVATE", "AA", "PDP", "CONTEXT", "REJECT", "Section", "9", ".", "5", ".", "12" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2777-L2786
train
237,289
phaethon/kamene
kamene/contrib/gsm_um.py
deactivateAaPdpContextRequest
def deactivateAaPdpContextRequest(): """DEACTIVATE AA PDP CONTEXT REQUEST Section 9.5.13""" a = TpPd(pd=0x8) b = MessageType(mesType=0x53) # 01010011 c = AaDeactivationCauseAndSpareHalfOctets() packet = a / b / c return packet
python
def deactivateAaPdpContextRequest(): """DEACTIVATE AA PDP CONTEXT REQUEST Section 9.5.13""" a = TpPd(pd=0x8) b = MessageType(mesType=0x53) # 01010011 c = AaDeactivationCauseAndSpareHalfOctets() packet = a / b / c return packet
[ "def", "deactivateAaPdpContextRequest", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x53", ")", "# 01010011", "c", "=", "AaDeactivationCauseAndSpareHalfOctets", "(", ")", "packet", "=", "a", "/", "b", "/", "c", "return", "packet" ]
DEACTIVATE AA PDP CONTEXT REQUEST Section 9.5.13
[ "DEACTIVATE", "AA", "PDP", "CONTEXT", "REQUEST", "Section", "9", ".", "5", ".", "13" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2789-L2795
train
237,290
phaethon/kamene
kamene/contrib/gsm_um.py
deactivateAaPdpContextAccept
def deactivateAaPdpContextAccept(): """DEACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.14""" a = TpPd(pd=0x8) b = MessageType(mesType=0x54) # 01010100 packet = a / b return packet
python
def deactivateAaPdpContextAccept(): """DEACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.14""" a = TpPd(pd=0x8) b = MessageType(mesType=0x54) # 01010100 packet = a / b return packet
[ "def", "deactivateAaPdpContextAccept", "(", ")", ":", "a", "=", "TpPd", "(", "pd", "=", "0x8", ")", "b", "=", "MessageType", "(", "mesType", "=", "0x54", ")", "# 01010100", "packet", "=", "a", "/", "b", "return", "packet" ]
DEACTIVATE AA PDP CONTEXT ACCEPT Section 9.5.14
[ "DEACTIVATE", "AA", "PDP", "CONTEXT", "ACCEPT", "Section", "9", ".", "5", ".", "14" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/gsm_um.py#L2798-L2803
train
237,291
phaethon/kamene
kamene/packet.py
ls
def ls(obj=None): """List available layers, or infos on a given layer""" if obj is None: import builtins all = builtins.__dict__.copy() all.update(globals()) objlst = sorted(conf.layers, key=lambda x:x.__name__) for o in objlst: print("%-10s : %s" %(o.__name__,o.name)) else: if isinstance(obj, type) and issubclass(obj, Packet): for f in obj.fields_desc: print("%-10s : %-20s = (%s)" % (f.name, f.__class__.__name__, repr(f.default))) elif isinstance(obj, Packet): for f in obj.fields_desc: print("%-10s : %-20s = %-15s (%s)" % (f.name, f.__class__.__name__, repr(getattr(obj,f.name)), repr(f.default))) if not isinstance(obj.payload, NoPayload): print("--") ls(obj.payload) else: print("Not a packet class. Type 'ls()' to list packet classes.")
python
def ls(obj=None): """List available layers, or infos on a given layer""" if obj is None: import builtins all = builtins.__dict__.copy() all.update(globals()) objlst = sorted(conf.layers, key=lambda x:x.__name__) for o in objlst: print("%-10s : %s" %(o.__name__,o.name)) else: if isinstance(obj, type) and issubclass(obj, Packet): for f in obj.fields_desc: print("%-10s : %-20s = (%s)" % (f.name, f.__class__.__name__, repr(f.default))) elif isinstance(obj, Packet): for f in obj.fields_desc: print("%-10s : %-20s = %-15s (%s)" % (f.name, f.__class__.__name__, repr(getattr(obj,f.name)), repr(f.default))) if not isinstance(obj.payload, NoPayload): print("--") ls(obj.payload) else: print("Not a packet class. Type 'ls()' to list packet classes.")
[ "def", "ls", "(", "obj", "=", "None", ")", ":", "if", "obj", "is", "None", ":", "import", "builtins", "all", "=", "builtins", ".", "__dict__", ".", "copy", "(", ")", "all", ".", "update", "(", "globals", "(", ")", ")", "objlst", "=", "sorted", "(", "conf", ".", "layers", ",", "key", "=", "lambda", "x", ":", "x", ".", "__name__", ")", "for", "o", "in", "objlst", ":", "print", "(", "\"%-10s : %s\"", "%", "(", "o", ".", "__name__", ",", "o", ".", "name", ")", ")", "else", ":", "if", "isinstance", "(", "obj", ",", "type", ")", "and", "issubclass", "(", "obj", ",", "Packet", ")", ":", "for", "f", "in", "obj", ".", "fields_desc", ":", "print", "(", "\"%-10s : %-20s = (%s)\"", "%", "(", "f", ".", "name", ",", "f", ".", "__class__", ".", "__name__", ",", "repr", "(", "f", ".", "default", ")", ")", ")", "elif", "isinstance", "(", "obj", ",", "Packet", ")", ":", "for", "f", "in", "obj", ".", "fields_desc", ":", "print", "(", "\"%-10s : %-20s = %-15s (%s)\"", "%", "(", "f", ".", "name", ",", "f", ".", "__class__", ".", "__name__", ",", "repr", "(", "getattr", "(", "obj", ",", "f", ".", "name", ")", ")", ",", "repr", "(", "f", ".", "default", ")", ")", ")", "if", "not", "isinstance", "(", "obj", ".", "payload", ",", "NoPayload", ")", ":", "print", "(", "\"--\"", ")", "ls", "(", "obj", ".", "payload", ")", "else", ":", "print", "(", "\"Not a packet class. Type 'ls()' to list packet classes.\"", ")" ]
List available layers, or infos on a given layer
[ "List", "available", "layers", "or", "infos", "on", "a", "given", "layer" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L1250-L1273
train
237,292
phaethon/kamene
kamene/packet.py
Packet.haslayer
def haslayer(self, cls): """true if self has a layer that is an instance of cls. Superseded by "cls in self" syntax.""" if self.__class__ == cls or self.__class__.__name__ == cls: return 1 for f in self.packetfields: fvalue_gen = self.getfieldval(f.name) if fvalue_gen is None: continue if not f.islist: fvalue_gen = SetGen(fvalue_gen,_iterpacket=0) for fvalue in fvalue_gen: if isinstance(fvalue, Packet): ret = fvalue.haslayer(cls) if ret: return ret return self.payload.haslayer(cls)
python
def haslayer(self, cls): """true if self has a layer that is an instance of cls. Superseded by "cls in self" syntax.""" if self.__class__ == cls or self.__class__.__name__ == cls: return 1 for f in self.packetfields: fvalue_gen = self.getfieldval(f.name) if fvalue_gen is None: continue if not f.islist: fvalue_gen = SetGen(fvalue_gen,_iterpacket=0) for fvalue in fvalue_gen: if isinstance(fvalue, Packet): ret = fvalue.haslayer(cls) if ret: return ret return self.payload.haslayer(cls)
[ "def", "haslayer", "(", "self", ",", "cls", ")", ":", "if", "self", ".", "__class__", "==", "cls", "or", "self", ".", "__class__", ".", "__name__", "==", "cls", ":", "return", "1", "for", "f", "in", "self", ".", "packetfields", ":", "fvalue_gen", "=", "self", ".", "getfieldval", "(", "f", ".", "name", ")", "if", "fvalue_gen", "is", "None", ":", "continue", "if", "not", "f", ".", "islist", ":", "fvalue_gen", "=", "SetGen", "(", "fvalue_gen", ",", "_iterpacket", "=", "0", ")", "for", "fvalue", "in", "fvalue_gen", ":", "if", "isinstance", "(", "fvalue", ",", "Packet", ")", ":", "ret", "=", "fvalue", ".", "haslayer", "(", "cls", ")", "if", "ret", ":", "return", "ret", "return", "self", ".", "payload", ".", "haslayer", "(", "cls", ")" ]
true if self has a layer that is an instance of cls. Superseded by "cls in self" syntax.
[ "true", "if", "self", "has", "a", "layer", "that", "is", "an", "instance", "of", "cls", ".", "Superseded", "by", "cls", "in", "self", "syntax", "." ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L749-L764
train
237,293
phaethon/kamene
kamene/packet.py
Packet.getlayer
def getlayer(self, cls, nb=1, _track=None): """Return the nb^th layer that is an instance of cls.""" if type(cls) is int: nb = cls+1 cls = None if type(cls) is str and "." in cls: ccls,fld = cls.split(".",1) else: ccls,fld = cls,None if cls is None or self.__class__ == cls or self.__class__.name == ccls: if nb == 1: if fld is None: return self else: return self.getfieldval(fld) else: nb -=1 for f in self.packetfields: fvalue_gen = self.getfieldval(f.name) if fvalue_gen is None: continue if not f.islist: fvalue_gen = SetGen(fvalue_gen,_iterpacket=0) for fvalue in fvalue_gen: if isinstance(fvalue, Packet): track=[] ret = fvalue.getlayer(cls, nb, _track=track) if ret is not None: return ret nb = track[0] return self.payload.getlayer(cls,nb,_track=_track)
python
def getlayer(self, cls, nb=1, _track=None): """Return the nb^th layer that is an instance of cls.""" if type(cls) is int: nb = cls+1 cls = None if type(cls) is str and "." in cls: ccls,fld = cls.split(".",1) else: ccls,fld = cls,None if cls is None or self.__class__ == cls or self.__class__.name == ccls: if nb == 1: if fld is None: return self else: return self.getfieldval(fld) else: nb -=1 for f in self.packetfields: fvalue_gen = self.getfieldval(f.name) if fvalue_gen is None: continue if not f.islist: fvalue_gen = SetGen(fvalue_gen,_iterpacket=0) for fvalue in fvalue_gen: if isinstance(fvalue, Packet): track=[] ret = fvalue.getlayer(cls, nb, _track=track) if ret is not None: return ret nb = track[0] return self.payload.getlayer(cls,nb,_track=_track)
[ "def", "getlayer", "(", "self", ",", "cls", ",", "nb", "=", "1", ",", "_track", "=", "None", ")", ":", "if", "type", "(", "cls", ")", "is", "int", ":", "nb", "=", "cls", "+", "1", "cls", "=", "None", "if", "type", "(", "cls", ")", "is", "str", "and", "\".\"", "in", "cls", ":", "ccls", ",", "fld", "=", "cls", ".", "split", "(", "\".\"", ",", "1", ")", "else", ":", "ccls", ",", "fld", "=", "cls", ",", "None", "if", "cls", "is", "None", "or", "self", ".", "__class__", "==", "cls", "or", "self", ".", "__class__", ".", "name", "==", "ccls", ":", "if", "nb", "==", "1", ":", "if", "fld", "is", "None", ":", "return", "self", "else", ":", "return", "self", ".", "getfieldval", "(", "fld", ")", "else", ":", "nb", "-=", "1", "for", "f", "in", "self", ".", "packetfields", ":", "fvalue_gen", "=", "self", ".", "getfieldval", "(", "f", ".", "name", ")", "if", "fvalue_gen", "is", "None", ":", "continue", "if", "not", "f", ".", "islist", ":", "fvalue_gen", "=", "SetGen", "(", "fvalue_gen", ",", "_iterpacket", "=", "0", ")", "for", "fvalue", "in", "fvalue_gen", ":", "if", "isinstance", "(", "fvalue", ",", "Packet", ")", ":", "track", "=", "[", "]", "ret", "=", "fvalue", ".", "getlayer", "(", "cls", ",", "nb", ",", "_track", "=", "track", ")", "if", "ret", "is", "not", "None", ":", "return", "ret", "nb", "=", "track", "[", "0", "]", "return", "self", ".", "payload", ".", "getlayer", "(", "cls", ",", "nb", ",", "_track", "=", "_track", ")" ]
Return the nb^th layer that is an instance of cls.
[ "Return", "the", "nb^th", "layer", "that", "is", "an", "instance", "of", "cls", "." ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L765-L795
train
237,294
phaethon/kamene
kamene/packet.py
Packet.show
def show(self, indent=3, lvl="", label_lvl=""): """Prints a hierarchical view of the packet. "indent" gives the size of indentation for each layer.""" ct = conf.color_theme print("%s%s %s %s" % (label_lvl, ct.punct("###["), ct.layer_name(self.name), ct.punct("]###"))) for f in self.fields_desc: if isinstance(f, ConditionalField) and not f._evalcond(self): continue if isinstance(f, Emph) or f in conf.emph: ncol = ct.emph_field_name vcol = ct.emph_field_value else: ncol = ct.field_name vcol = ct.field_value fvalue = self.getfieldval(f.name) if isinstance(fvalue, Packet) or (f.islist and f.holds_packets and type(fvalue) is list): print("%s \\%-10s\\" % (label_lvl+lvl, ncol(f.name))) fvalue_gen = SetGen(fvalue,_iterpacket=0) for fvalue in fvalue_gen: fvalue.show(indent=indent, label_lvl=label_lvl+lvl+" |") else: begn = "%s %-10s%s " % (label_lvl+lvl, ncol(f.name), ct.punct("="),) reprval = f.i2repr(self,fvalue) if type(reprval) is str: reprval = reprval.replace("\n", "\n"+" "*(len(label_lvl) +len(lvl) +len(f.name) +4)) print("%s%s" % (begn,vcol(reprval))) self.payload.show(indent=indent, lvl=lvl+(" "*indent*self.show_indent), label_lvl=label_lvl)
python
def show(self, indent=3, lvl="", label_lvl=""): """Prints a hierarchical view of the packet. "indent" gives the size of indentation for each layer.""" ct = conf.color_theme print("%s%s %s %s" % (label_lvl, ct.punct("###["), ct.layer_name(self.name), ct.punct("]###"))) for f in self.fields_desc: if isinstance(f, ConditionalField) and not f._evalcond(self): continue if isinstance(f, Emph) or f in conf.emph: ncol = ct.emph_field_name vcol = ct.emph_field_value else: ncol = ct.field_name vcol = ct.field_value fvalue = self.getfieldval(f.name) if isinstance(fvalue, Packet) or (f.islist and f.holds_packets and type(fvalue) is list): print("%s \\%-10s\\" % (label_lvl+lvl, ncol(f.name))) fvalue_gen = SetGen(fvalue,_iterpacket=0) for fvalue in fvalue_gen: fvalue.show(indent=indent, label_lvl=label_lvl+lvl+" |") else: begn = "%s %-10s%s " % (label_lvl+lvl, ncol(f.name), ct.punct("="),) reprval = f.i2repr(self,fvalue) if type(reprval) is str: reprval = reprval.replace("\n", "\n"+" "*(len(label_lvl) +len(lvl) +len(f.name) +4)) print("%s%s" % (begn,vcol(reprval))) self.payload.show(indent=indent, lvl=lvl+(" "*indent*self.show_indent), label_lvl=label_lvl)
[ "def", "show", "(", "self", ",", "indent", "=", "3", ",", "lvl", "=", "\"\"", ",", "label_lvl", "=", "\"\"", ")", ":", "ct", "=", "conf", ".", "color_theme", "print", "(", "\"%s%s %s %s\"", "%", "(", "label_lvl", ",", "ct", ".", "punct", "(", "\"###[\"", ")", ",", "ct", ".", "layer_name", "(", "self", ".", "name", ")", ",", "ct", ".", "punct", "(", "\"]###\"", ")", ")", ")", "for", "f", "in", "self", ".", "fields_desc", ":", "if", "isinstance", "(", "f", ",", "ConditionalField", ")", "and", "not", "f", ".", "_evalcond", "(", "self", ")", ":", "continue", "if", "isinstance", "(", "f", ",", "Emph", ")", "or", "f", "in", "conf", ".", "emph", ":", "ncol", "=", "ct", ".", "emph_field_name", "vcol", "=", "ct", ".", "emph_field_value", "else", ":", "ncol", "=", "ct", ".", "field_name", "vcol", "=", "ct", ".", "field_value", "fvalue", "=", "self", ".", "getfieldval", "(", "f", ".", "name", ")", "if", "isinstance", "(", "fvalue", ",", "Packet", ")", "or", "(", "f", ".", "islist", "and", "f", ".", "holds_packets", "and", "type", "(", "fvalue", ")", "is", "list", ")", ":", "print", "(", "\"%s \\\\%-10s\\\\\"", "%", "(", "label_lvl", "+", "lvl", ",", "ncol", "(", "f", ".", "name", ")", ")", ")", "fvalue_gen", "=", "SetGen", "(", "fvalue", ",", "_iterpacket", "=", "0", ")", "for", "fvalue", "in", "fvalue_gen", ":", "fvalue", ".", "show", "(", "indent", "=", "indent", ",", "label_lvl", "=", "label_lvl", "+", "lvl", "+", "\" |\"", ")", "else", ":", "begn", "=", "\"%s %-10s%s \"", "%", "(", "label_lvl", "+", "lvl", ",", "ncol", "(", "f", ".", "name", ")", ",", "ct", ".", "punct", "(", "\"=\"", ")", ",", ")", "reprval", "=", "f", ".", "i2repr", "(", "self", ",", "fvalue", ")", "if", "type", "(", "reprval", ")", "is", "str", ":", "reprval", "=", "reprval", ".", "replace", "(", "\"\\n\"", ",", "\"\\n\"", "+", "\" \"", "*", "(", "len", "(", "label_lvl", ")", "+", "len", "(", "lvl", ")", "+", "len", "(", "f", ".", "name", ")", "+", "4", ")", ")", "print", "(", "\"%s%s\"", "%", "(", "begn", ",", "vcol", "(", "reprval", ")", ")", ")", "self", ".", "payload", ".", "show", "(", "indent", "=", "indent", ",", "lvl", "=", "lvl", "+", "(", "\" \"", "*", "indent", "*", "self", ".", "show_indent", ")", ",", "label_lvl", "=", "label_lvl", ")" ]
Prints a hierarchical view of the packet. "indent" gives the size of indentation for each layer.
[ "Prints", "a", "hierarchical", "view", "of", "the", "packet", ".", "indent", "gives", "the", "size", "of", "indentation", "for", "each", "layer", "." ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L843-L876
train
237,295
phaethon/kamene
kamene/packet.py
Packet.decode_payload_as
def decode_payload_as(self,cls): """Reassembles the payload and decode it using another packet class""" s = bytes(self.payload) self.payload = cls(s, _internal=1, _underlayer=self) pp = self while pp.underlayer is not None: pp = pp.underlayer self.payload.dissection_done(pp)
python
def decode_payload_as(self,cls): """Reassembles the payload and decode it using another packet class""" s = bytes(self.payload) self.payload = cls(s, _internal=1, _underlayer=self) pp = self while pp.underlayer is not None: pp = pp.underlayer self.payload.dissection_done(pp)
[ "def", "decode_payload_as", "(", "self", ",", "cls", ")", ":", "s", "=", "bytes", "(", "self", ".", "payload", ")", "self", ".", "payload", "=", "cls", "(", "s", ",", "_internal", "=", "1", ",", "_underlayer", "=", "self", ")", "pp", "=", "self", "while", "pp", ".", "underlayer", "is", "not", "None", ":", "pp", "=", "pp", ".", "underlayer", "self", ".", "payload", ".", "dissection_done", "(", "pp", ")" ]
Reassembles the payload and decode it using another packet class
[ "Reassembles", "the", "payload", "and", "decode", "it", "using", "another", "packet", "class" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L1026-L1033
train
237,296
phaethon/kamene
kamene/packet.py
Packet.libnet
def libnet(self): """Not ready yet. Should give the necessary C code that interfaces with libnet to recreate the packet""" print("libnet_build_%s(" % self.__class__.name.lower()) det = self.__class__(str(self)) for f in self.fields_desc: val = det.getfieldval(f.name) if val is None: val = 0 elif type(val) is int: val = str(val) else: val = '"%s"' % str(val) print("\t%s, \t\t/* %s */" % (val,f.name)) print(");")
python
def libnet(self): """Not ready yet. Should give the necessary C code that interfaces with libnet to recreate the packet""" print("libnet_build_%s(" % self.__class__.name.lower()) det = self.__class__(str(self)) for f in self.fields_desc: val = det.getfieldval(f.name) if val is None: val = 0 elif type(val) is int: val = str(val) else: val = '"%s"' % str(val) print("\t%s, \t\t/* %s */" % (val,f.name)) print(");")
[ "def", "libnet", "(", "self", ")", ":", "print", "(", "\"libnet_build_%s(\"", "%", "self", ".", "__class__", ".", "name", ".", "lower", "(", ")", ")", "det", "=", "self", ".", "__class__", "(", "str", "(", "self", ")", ")", "for", "f", "in", "self", ".", "fields_desc", ":", "val", "=", "det", ".", "getfieldval", "(", "f", ".", "name", ")", "if", "val", "is", "None", ":", "val", "=", "0", "elif", "type", "(", "val", ")", "is", "int", ":", "val", "=", "str", "(", "val", ")", "else", ":", "val", "=", "'\"%s\"'", "%", "str", "(", "val", ")", "print", "(", "\"\\t%s, \\t\\t/* %s */\"", "%", "(", "val", ",", "f", ".", "name", ")", ")", "print", "(", "\");\"", ")" ]
Not ready yet. Should give the necessary C code that interfaces with libnet to recreate the packet
[ "Not", "ready", "yet", ".", "Should", "give", "the", "necessary", "C", "code", "that", "interfaces", "with", "libnet", "to", "recreate", "the", "packet" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/packet.py#L1035-L1048
train
237,297
phaethon/kamene
kamene/contrib/doip.py
DoIPRawPacket.dissect
def dissect(self, b): """ Dissect an incoming DoIP packet. :param b: bytes to dissect :type b: bytes :raises: ValueError """ if len(b) < 8: raise ValueError("given packet too short") return super(DoIPRawPacket, self).dissect(b)
python
def dissect(self, b): """ Dissect an incoming DoIP packet. :param b: bytes to dissect :type b: bytes :raises: ValueError """ if len(b) < 8: raise ValueError("given packet too short") return super(DoIPRawPacket, self).dissect(b)
[ "def", "dissect", "(", "self", ",", "b", ")", ":", "if", "len", "(", "b", ")", "<", "8", ":", "raise", "ValueError", "(", "\"given packet too short\"", ")", "return", "super", "(", "DoIPRawPacket", ",", "self", ")", ".", "dissect", "(", "b", ")" ]
Dissect an incoming DoIP packet. :param b: bytes to dissect :type b: bytes :raises: ValueError
[ "Dissect", "an", "incoming", "DoIP", "packet", "." ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/contrib/doip.py#L69-L79
train
237,298
phaethon/kamene
kamene/pton_ntop.py
inet_pton
def inet_pton(af, addr): """Convert an IP address from text representation into binary form""" print('hello') if af == socket.AF_INET: return inet_aton(addr) elif af == socket.AF_INET6: # IPv6: The use of "::" indicates one or more groups of 16 bits of zeros. # We deal with this form of wildcard using a special marker. JOKER = b"*" while b"::" in addr: addr = addr.replace(b"::", b":" + JOKER + b":") joker_pos = None # The last part of an IPv6 address can be an IPv4 address ipv4_addr = None if b"." in addr: ipv4_addr = addr.split(b":")[-1] result = b"" parts = addr.split(b":") for part in parts: if part == JOKER: # Wildcard is only allowed once if joker_pos is None: joker_pos = len(result) else: raise Exception("Illegal syntax for IP address") elif part == ipv4_addr: # FIXME: Make sure IPv4 can only be last part # FIXME: inet_aton allows IPv4 addresses with less than 4 octets result += socket.inet_aton(ipv4_addr) else: # Each part must be 16bit. Add missing zeroes before decoding. try: result += part.rjust(4, b"0").decode("hex") except TypeError: raise Exception("Illegal syntax for IP address") # If there's a wildcard, fill up with zeros to reach 128bit (16 bytes) if JOKER in addr: result = (result[:joker_pos] + b"\x00" * (16 - len(result)) + result[joker_pos:]) if len(result) != 16: raise Exception("Illegal syntax for IP address") return result else: raise Exception("Address family not supported")
python
def inet_pton(af, addr): """Convert an IP address from text representation into binary form""" print('hello') if af == socket.AF_INET: return inet_aton(addr) elif af == socket.AF_INET6: # IPv6: The use of "::" indicates one or more groups of 16 bits of zeros. # We deal with this form of wildcard using a special marker. JOKER = b"*" while b"::" in addr: addr = addr.replace(b"::", b":" + JOKER + b":") joker_pos = None # The last part of an IPv6 address can be an IPv4 address ipv4_addr = None if b"." in addr: ipv4_addr = addr.split(b":")[-1] result = b"" parts = addr.split(b":") for part in parts: if part == JOKER: # Wildcard is only allowed once if joker_pos is None: joker_pos = len(result) else: raise Exception("Illegal syntax for IP address") elif part == ipv4_addr: # FIXME: Make sure IPv4 can only be last part # FIXME: inet_aton allows IPv4 addresses with less than 4 octets result += socket.inet_aton(ipv4_addr) else: # Each part must be 16bit. Add missing zeroes before decoding. try: result += part.rjust(4, b"0").decode("hex") except TypeError: raise Exception("Illegal syntax for IP address") # If there's a wildcard, fill up with zeros to reach 128bit (16 bytes) if JOKER in addr: result = (result[:joker_pos] + b"\x00" * (16 - len(result)) + result[joker_pos:]) if len(result) != 16: raise Exception("Illegal syntax for IP address") return result else: raise Exception("Address family not supported")
[ "def", "inet_pton", "(", "af", ",", "addr", ")", ":", "print", "(", "'hello'", ")", "if", "af", "==", "socket", ".", "AF_INET", ":", "return", "inet_aton", "(", "addr", ")", "elif", "af", "==", "socket", ".", "AF_INET6", ":", "# IPv6: The use of \"::\" indicates one or more groups of 16 bits of zeros.", "# We deal with this form of wildcard using a special marker. ", "JOKER", "=", "b\"*\"", "while", "b\"::\"", "in", "addr", ":", "addr", "=", "addr", ".", "replace", "(", "b\"::\"", ",", "b\":\"", "+", "JOKER", "+", "b\":\"", ")", "joker_pos", "=", "None", "# The last part of an IPv6 address can be an IPv4 address", "ipv4_addr", "=", "None", "if", "b\".\"", "in", "addr", ":", "ipv4_addr", "=", "addr", ".", "split", "(", "b\":\"", ")", "[", "-", "1", "]", "result", "=", "b\"\"", "parts", "=", "addr", ".", "split", "(", "b\":\"", ")", "for", "part", "in", "parts", ":", "if", "part", "==", "JOKER", ":", "# Wildcard is only allowed once", "if", "joker_pos", "is", "None", ":", "joker_pos", "=", "len", "(", "result", ")", "else", ":", "raise", "Exception", "(", "\"Illegal syntax for IP address\"", ")", "elif", "part", "==", "ipv4_addr", ":", "# FIXME: Make sure IPv4 can only be last part", "# FIXME: inet_aton allows IPv4 addresses with less than 4 octets ", "result", "+=", "socket", ".", "inet_aton", "(", "ipv4_addr", ")", "else", ":", "# Each part must be 16bit. Add missing zeroes before decoding. ", "try", ":", "result", "+=", "part", ".", "rjust", "(", "4", ",", "b\"0\"", ")", ".", "decode", "(", "\"hex\"", ")", "except", "TypeError", ":", "raise", "Exception", "(", "\"Illegal syntax for IP address\"", ")", "# If there's a wildcard, fill up with zeros to reach 128bit (16 bytes) ", "if", "JOKER", "in", "addr", ":", "result", "=", "(", "result", "[", ":", "joker_pos", "]", "+", "b\"\\x00\"", "*", "(", "16", "-", "len", "(", "result", ")", ")", "+", "result", "[", "joker_pos", ":", "]", ")", "if", "len", "(", "result", ")", "!=", "16", ":", "raise", "Exception", "(", "\"Illegal syntax for IP address\"", ")", "return", "result", "else", ":", "raise", "Exception", "(", "\"Address family not supported\"", ")" ]
Convert an IP address from text representation into binary form
[ "Convert", "an", "IP", "address", "from", "text", "representation", "into", "binary", "form" ]
11d4064844f4f68ac5d7546f5633ac7d02082914
https://github.com/phaethon/kamene/blob/11d4064844f4f68ac5d7546f5633ac7d02082914/kamene/pton_ntop.py#L15-L61
train
237,299