| 1 | #ifndef _PACKET_TYPE |
| 2 | #define _PACKET_TYPE |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | typedef struct pgI{ |
| 9 | // L2 |
| 10 | unsigned char l2_sa[6]; |
| 11 | unsigned char l2_da[6]; |
| 12 | int l2_length; |
| 13 | int type ; // type field |
| 14 | |
| 15 | // L3/L4 |
| 16 | int flow_id ; |
| 17 | int tpid ; |
| 18 | int tci ; |
| 19 | |
| 20 | int header_length ; |
| 21 | int ttl ; |
| 22 | unsigned char spi[4]; ; |
| 23 | unsigned char nxthdr ; |
| 24 | unsigned char tos ; |
| 25 | unsigned char src_ipv6_addr[16] ; |
| 26 | unsigned char dst_ipv6_addr[16] ; |
| 27 | unsigned char src_ip_addr[8] ; |
| 28 | unsigned char dst_ip_addr[8] ; |
| 29 | unsigned char src_port[2] ; |
| 30 | unsigned char dst_port[2] ; |
| 31 | unsigned char tcp_flags ; |
| 32 | unsigned char rcv_isn[4] ; |
| 33 | int l3_length; |
| 34 | int l4_length; |
| 35 | |
| 36 | |
| 37 | int frame_class ; |
| 38 | int frame_type; |
| 39 | // Payload related fields |
| 40 | int data_type ; |
| 41 | int data_seed ; |
| 42 | int gId ; |
| 43 | int data_length; |
| 44 | |
| 45 | }pgInterface; |
| 46 | |
| 47 | #define TOTAL_NUMBER 100 |
| 48 | |
| 49 | #define DATA_RAND 0 |
| 50 | #define DATA_SEQ 1 |
| 51 | #define DATA_FC_PAUSE 4 |
| 52 | #define DATA_ALL0 6 |
| 53 | #define DATA_ALL1 7 |
| 54 | #define DATA_FIXED 8 |
| 55 | |
| 56 | #ifdef __cplusplus |
| 57 | } |
| 58 | #endif |
| 59 | |
| 60 | #endif /* _PACKET_TYPE */ |
| 61 | |