diff options
author | imarom <imarom@cisco.com> | 2016-02-03 09:21:10 -0500 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-02-03 14:07:14 -0500 |
commit | 2887433cb71f43c9bf91226915959f5ebea49869 (patch) | |
tree | 70c9e62a9e64a26d71f7dcfabb04e5f22993d353 /scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py | |
parent | 7447c92021d7ce3fc0fe115109b54a2f681f2392 (diff) |
integration with scapy
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py')
-rw-r--r-- | scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py b/scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py new file mode 100644 index 00000000..b6e7c026 --- /dev/null +++ b/scripts/automation/trex_control_plane/client_utils/packet_builder_interface.py @@ -0,0 +1,43 @@ + +# base object class for a packet builder +class CTrexPktBuilderInterface(object): + + def compile (self): + """ + Compiles the packet and VM + """ + raise Exception("implement me") + + + def dump_pkt(self): + """ + Dumps the packet as a decimal array of bytes (each item x gets value between 0-255) + + :parameters: + None + + :return: + + packet representation as array of bytes + + :raises: + + :exc:`CTRexPktBuilder.EmptyPacketError`, in case packet is empty. + + """ + + raise Exception("implement me") + + + def get_vm_data(self): + """ + Dumps the instructions + + :parameters: + None + + :return: + + json object of instructions + + """ + + raise Exception("implement me") + |