gen_pkt.h (1289B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * Extern declarations for test functions in gen_pkt.c 8 */ 9 10 #define NUM_BYTES_MAC_ADDR 6 11 #define NUM_BYTES_IPV4_ADDR 4 12 #define NUM_BYTES_L2_HDR 18 13 #define NUM_BYTES_IPV4_HDR 20 14 #define NUM_BYTES_IPV6_HDR 40 15 #define NUM_BYTES_SEQ_ID 6 16 #define NUM_BYTES_CRC 4 17 #define MIN_IPV6_PKT_SIZE NUM_BYTES_L2_HDR + NUM_BYTES_IPV6_HDR + \ 18 NUM_BYTES_SEQ_ID + NUM_BYTES_CRC 19 #define NUM_BYTES_MPLS_HDR 4 20 21 extern uint32 tgp_reflect(uint32, uint32); 22 extern void tgp_populate_crc_table(void); 23 extern unsigned int tgp_generate_calculate_crc(uint8*, int32); 24 extern void tgp_gen_random_l2_pkt(uint8*, uint32, uint8[], uint8[], 25 uint16, uint16); 26 extern void tgp_gen_random_ip_pkt(uint8, uint8*, uint32, uint8[], uint8[], 27 uint16, uint32, uint32, uint8, uint8); 28 extern void tgp_print_pkt(uint8 *pkt_ptr, uint32 pkt_size); 29 30 extern void 31 tgp_gen_random_mpls_ip_pkt( 32 uint8*, 33 uint32, 34 uint8[], 35 uint8[], 36 uint16, 37 int, 38 int, 39 uint32*, 40 int, 41 uint32*, 42 uint32*, 43 uint8, 44 uint8);