summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client_utils
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils')
-rw-r--r--scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py b/scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py
index 5ee4a044..62abe2ee 100644
--- a/scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py
+++ b/scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py
@@ -354,10 +354,13 @@ class CTRexScapyPktUtl(object):
"""
return layer offset by string
+ :parameters:
+
IP:0
IP:1
return offset
+
"""
l1=layer_des.split(":")
layer=""
@@ -377,13 +380,14 @@ class CTRexScapyPktUtl(object):
"""
return field_des (offset,size) layer:cnt.field
for example
-
+ 802|1Q.vlan get 802.1Q->valn replace | with .
IP.src
IP:0.src (first IP.src like IP.src)
for example IP:1.src for internal IP
return (offset, size) as tuple
+
"""
s=field_des.split(".");
@@ -391,7 +395,7 @@ class CTRexScapyPktUtl(object):
raise CTRexPacketBuildException(-11,("field desription should be layer:cnt.field e.g IP.src or IP:1.src "));
- layer_ex = s[0]
+ layer_ex = s[0].replace("|",".")
field = s[1]
l1=layer_ex.split(":")