pycrate
pycrate copied to clipboard
i want to add Cont ,NCPOpt ,ProtConfigElt in PCO in GTP-C Create Session Request massage
I'm using Python version 3.8.10 and PyCrate version 0.5.3
this is my code.. from pycrate_mobile.TS29274_GTPC import * m = CreateSessionRequest()
m[1].add_ie(78,0) ''' I added Information Element Type 78 means Protocol Configuration Options (PCO)''' print(m[1].show()) ''' Then I printed it'''
'''### CreateSessionRequestIEs ###
PCO
GTPCIEHdr
<Type : 78 (Protocol Configuration Options (PCO))> <Len : 1> <spare : 0> <Inst : 0>
PCO
<Ext : 1> <spare : 0> <Prot : 0 (PPP with IP PDP)>
Config ###'''
After that I try to Set Remaining values But I'm able to set only one value. m[1][0][1][3].set_val([{'ID':13}]) print(m[1].show()) ''' Then I printed it '''
### CreateSessionRequestIEs ###
### PCO ###
### GTPCIEHdr ###
<Type : 78 (Protocol Configuration Options (PCO))>
<Len : 4>
<spare : 0>
<Inst : 0>
### PCO ###
<Ext : 1>
<spare : 0>
<Prot : 0 (PPP with IP PDP)>
### Config ###
### ProtConfigElt ###
<ID : 13 (DNS server IPv4 address request)>
<Len : 0>
<Cont : 0x>
I already have a pcap I want to create exact same.
I try to add and set ProtConfigElt Cont ,NCPOpt in PCO same as shown in below pcap can you plz help me
.
Could you please, at least, do some efforts to make your issue readable ?