summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packet_builder_yaml.asciidoc121
-rwxr-xr-xwscript3
2 files changed, 124 insertions, 0 deletions
diff --git a/packet_builder_yaml.asciidoc b/packet_builder_yaml.asciidoc
new file mode 100644
index 00000000..1252e73e
--- /dev/null
+++ b/packet_builder_yaml.asciidoc
@@ -0,0 +1,121 @@
+
+== A file format for GUI packet builder
+
+=== Introduction
+
+We would like a file that will be read by GUI and will give us the ability to build packets using GUI
+
+The format should be *YAML*
+
+
+=== High Level Requirement
+
+* Define a YAML object format for dynamic building of packets and a program that change various fields
+* Ability to *parse* back the same buffer that was created using this tool (reversibility)
+** Ability to load packet from a pcap file and parse it
+* Ability to save the packet to a pcap file
+* Ability to save the packet and program in JSON format (same JSON-RPC format)
+* Set a value for any field of any protocol
+* Vary packet fields across packets at run time e.g. changing IP/MAC addresses
+* Stack protocols in any arbitrary order define in YAML format
+
+=== Header that should be supported (first phase)
+
+==== L2
+
+* Ethernet
+* 802.3
+* LLC SNAP
+*VLAN (with QinQ) stack
+*MPLS stack
+
+==== L3
+
+* ARP
+* IPv4
+* IPv6 (4x header)
+* IP-in-IP a.k.a IP Tunnelling (6over4, 4over6, 4over4, 6over6)
+
+==== L4
+
+* TCP
+* UDP
+* ICMPv4
+* ICMPv6
+* IGMP
+
+==== L7
+
+* Any text based protocol (HTTP, SIP, RTSP, NNTP etc.)
+** random string
+** repeat string
+
+* Pattern Binary
+** repeat of value (e.g 0x55)
+** random
+** seq (1,2,3,3,4)
+** User Hex Dump editor
+
+
+=== YAML Format
+
+
+==== Header section
+
+It describes objects like TCP/UDP/VLAN/MPLS/IPV6/IPv6 Headers/ICMPv4/ICMPv6/IGMP
+
+Tree line object description
+
+[source,python]
+----
+ - name : object name ( object )
+ - Fields
+ -- bits or bytes
+ -- Array size of types (default 1)
+ -- Type (uint8, uint16_t, uint32_t, uint16_t, string, string_bl)
+ -- edit_type [ipv4, ipv6, buffer,string , string_nl]
+ -- edian - can be default as big,
+ -- Default value (buffer 0x00,0x12,0x13), format-
+ -- Exception: ipv4_header_size (bitsx44, ipv4_checksum, tcp_udp_checsum, ipv4_total_length)
+ -- header_size_multi (this field represents the
+ -- childes_field_list : could be null in default TCP flags is an example of this
+ -- *Choice* on by one fields [ Sub Tree] example {01 : Object1 , 02: object2 , 03:Object5}
+ -- Fields that can't change without repeat from the start in the GUI for example ip_ength, protocol ,
+ -- Next protocol ( dict value : name )
+
+
+ PFP -fields
+ -- ipv4/ipv6 range min-max
+ random min-max
+ -- every uint8,uint16_t, uint32_t could be create a range
+----
+
+
+==== Relations between object headers
+
+* Represents the order of the headers in the build process.
+* It is a tree like relation and could have a loop in the tree (ip inside ip)
+
+[source,python]
+----
+
+root -> L2 ( Ethernet , 802.3 , LLC SNAP )
+ |( by field )
+ |
+ ------------------------------------- ( VLAN (with QinQ), MPLS , ipv4, ipv6, ARP , ICMP )
+ | | | |
+ | ipv4/ipv6 - -
+ | |
+ | |
+ [Possibility - Ethernet/802.3/LLC SNAP) | UDP/TCP/Pyload
+ Object | |
+ for each option there tree of all the option --- -
+----
+
+
+=== Resource
+* link:https://wireedit.com/[WireEdit]
+* link:https://code.google.com/p/ostinato/[ostinato]
+* link:http://www.slideshare.net/nlekh/ixiaexplorer[IxExplorer]
+
+
diff --git a/wscript b/wscript
index 62ed702b..e8c1ef0d 100755
--- a/wscript
+++ b/wscript
@@ -186,6 +186,9 @@ def build(bld):
source='vm_doc.asciidoc waf.css', target='vm_doc.html', scan=ascii_doc_scan)
bld(rule='${ASCIIDOC} -a stylesheet=${SRC[1].abspath()} -a icons=true -a toc2 -a max-width=55em -o ${TGT} ${SRC[0].abspath()}',
+ source='packet_builder_yaml.asciidoc waf.css', target='packet_builder_yaml.html', scan=ascii_doc_scan)
+
+ bld(rule='${ASCIIDOC} -a stylesheet=${SRC[1].abspath()} -a icons=true -a toc2 -a max-width=55em -o ${TGT} ${SRC[0].abspath()}',
source='trex_control_plane_design_phase1.asciidoc waf.css', target='trex_control_plane_design_phase1.html', scan=ascii_doc_scan)
bld(rule='${ASCIIDOC} -a stylesheet=${SRC[1].abspath()} -a icons=true -a toc2 -a max-width=55em -o ${TGT} ${SRC[0].abspath()}',