summaryrefslogtreecommitdiff
path: root/trafgen_l2.h
AgeCommit message (Collapse)AuthorFilesLines
2016-10-04trafgen: l2: Add support for PFC headerVadim Kochan1-0/+21
Add PFC header fields setting (prio vector, time per priority). By default Ethernet header is pushed with required fields. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-10-04trafgen: l2: Add support for IEEE 802.3X PAUSE headerVadim Kochan1-0/+5
Add EEE802.3X Ethernet MAC Control PAUSE frame proto header with two fields - opcode & time. By default Ethernet header is pushed on header init. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-02-23trafgen: l2: Add MPLS header generationVadim Kochan1-0/+7
Add support for MPLS header creating with fields: Label, TClass, Bottom-Stack, TTL By default S-field is set to 1 (last label), but resets to 0 if lower MPLS header is added. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-02-02trafgen: l2: Add VLAN header generationVadim Kochan1-0/+9
Add generation of VLAN header with supported fields: TPID, DEI/CFI, PCP, VID Changed struct proto_field.offset uint16_t -> int16_t to make TPID offset -2 to point to ether type. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-01-29trafgen: parser: Support "etype"/"type" keywords for EthertypeTobias Klauser1-1/+1
The IEEE 802.3 standard commonly refers to the field specifying the upper layer protocol as Ethertype, not protocol. Thus, also support the keywords "etype" and "type" for this field. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-01-28trafgen: l2: Add ARP header generation logicVadim Kochan1-0/+12
Add ARP protocol header fields generation. By default htype ethernet (1) and ptype IPv4 (0x0800) and the corresponding hlen/plen values will be initialized and the opcode is set to ARP Request (1). Source MAC and IP address are set to the device's addresses if not specified. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> [tk: rephrase and extend commit message] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2016-01-28trafgen: l2: Add Ethernet protocol header generationVadim Kochan1-0/+12
Add trafgen_l2.c module for generating L2 related headers. Add Ethernet header generating. By default source MAC address is used from the specified output device. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>