35 [IP_PROTOCOL_ICMP] = 16, [IP_PROTOCOL_IGMP] = 8,
36 [IP_PROTOCOL_TCP] = 32, [IP_PROTOCOL_UDP] = 32,
37 [IP_PROTOCOL_IPSEC_ESP] = 32, [IP_PROTOCOL_IPSEC_AH] = 32,
38 [IP_PROTOCOL_ICMP6] = 16,
70 if ((((
u8 *) p)[0] & 0xf0) == 0x40)
72 else if ((((
u8 *) p)[0] & 0xf0) == 0x60)
95 hash[0] = clib_crc32c (
key[0].as_u8,
sizeof (
key[0]));
96 hash[1] = clib_crc32c (
key[1].as_u8,
sizeof (
key[1]));
97 hash[2] = clib_crc32c (
key[2].as_u8,
sizeof (
key[2]));
98 hash[3] = clib_crc32c (
key[3].as_u8,
sizeof (
key[3]));
111 hash[0] = clib_crc32c (
key.as_u8, sizeof (
key));
122 u16 ethertype = 0, l2hdr_sz = 0;
125 ethertype = clib_net_to_host_u16 (eh->
type);
132 ethertype = clib_net_to_host_u16 (vlan->
type);
133 l2hdr_sz +=
sizeof (*vlan);
137 ethertype = clib_net_to_host_u16 (vlan->
type);
138 l2hdr_sz +=
sizeof (*vlan);
142 if (ethertype == ETHERNET_TYPE_IP4)
147 else if (ethertype == ETHERNET_TYPE_IP6)
173 hash[0] = clib_crc32c (
key[0].as_u8,
sizeof (
key[0]));
174 hash[1] = clib_crc32c (
key[1].as_u8,
sizeof (
key[1]));
175 hash[2] = clib_crc32c (
key[2].as_u8,
sizeof (
key[2]));
176 hash[3] = clib_crc32c (
key[3].as_u8,
sizeof (
key[3]));
189 hash[0] = clib_crc32c (
key.as_u8, sizeof (
key));
198 .name =
"crc32c-5tuple",
199 .description =
"IPv4/IPv6 header and TCP/UDP ports",