summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client_utils
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-03 09:23:09 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-03 09:23:09 +0200
commit2e8a6255330ae7babdd0ace9889fa89796ac3687 (patch)
tree90d41cff6fc84403638f3a8043a15bbe9daf89a4 /scripts/automation/trex_control_plane/client_utils
parenta1cc404d690f7c1b875c364f247062be1178e202 (diff)
add fixup offset
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils')
-rw-r--r--scripts/automation/trex_control_plane/client_utils/scapy_packet_builder.py6
1 files changed, 4 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 62abe2ee..fda77cf7 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
@@ -508,10 +508,12 @@ class CTRexVmDescFixIpv4(CTRexVmDescBase):
self.offset = parent._pkt_layer_offset(self.offset);
class CTRexVmDescWrFlowVar(CTRexVmDescBase):
- def __init__(self,fv_name,pkt_offset,add_val=0,is_big=True):
+ def __init__(self,fv_name,pkt_offset,offset_fixup=0,add_val=0,is_big=True):
super(CTRexVmDescWrFlowVar, self).__init__()
self.name =fv_name
assert(type(fv_name)==str);
+ self.offset_fixup =offset_fixup
+ assert(type(offset_fixup)==int);
self.pkt_offset =pkt_offset
self.add_val =add_val
assert(type(add_val)==int);
@@ -519,7 +521,7 @@ class CTRexVmDescWrFlowVar(CTRexVmDescBase):
assert(type(is_big)==bool);
def get_obj (self):
- return CTRexVmInsWrFlowVar(self.name,self.pkt_offset,self.add_val,self.is_big)
+ return CTRexVmInsWrFlowVar(self.name,self.pkt_offset+self.offset_fixup,self.add_val,self.is_big)
def compile(self,parent):
if type(self.pkt_offset)==str: