Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IE 187(Maximum Wait Time) and 188(Millisecond Time Stamp) to gtp_v2.py #4376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions scapy/contrib/gtp_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
163: "Additional Protocol Configuration Options",
170: "ULI Timestamp",
172: "RAN/NAS Cause",
187: "Integer Number : Maximum Wait Time",
188: "Millisecond Time Stamp",
197: "Extended Protocol Configuration Options",
202: "UP Function Selection Indication Flags",
255: "Private Extension",
Expand Down Expand Up @@ -1427,6 +1429,21 @@ class IE_MMBR(gtp.IE_Base):
IntField("uplink_rate", 0),
IntField("downlink_rate", 0)]

class IE_Maximum_Wait_Time(gtp.IE_Base):
name = "IE Maximum Wait Time"
fields_desc = [ByteEnumField("ietype", 187, IEType),
ShortField("length", None),
BitField("CR_flag", 0, 4),
BitField("instance", 0, 4),
ShortField("MaximumWaitTime", 4)]

class IE_Millisecond_Time_Stamp(gtp.IE_Base):
name = "IE Millisecond Time Stamp"
fields_desc = [ByteEnumField("ietype", 188, IEType),
ShortField("length", None),
BitField("CR_flag", 0, 4),
BitField("instance", 0, 4),
BitField("OriginationTimeStamp", 0, 48)]

class IE_UPF_SelInd_Flags(gtp.IE_Base):
name = "IE UP Function Selection Indication Flags"
Expand Down Expand Up @@ -1518,6 +1535,8 @@ class IE_PrivateExtension(gtp.IE_Base):
163: IE_APCO,
170: IE_ULI_Timestamp,
172: IE_Ran_Nas_Cause,
187: IE_Maximum_Wait_Time,
188: IE_Millisecond_Time_Stamp,
197: IE_EPCO,
202: IE_UPF_SelInd_Flags,
255: IE_PrivateExtension}
Expand Down