Lines Matching refs:pckt
201 static __noinline __u32 get_packet_hash(struct packet_description *pckt, bool ipv6) in get_packet_hash() argument
204 return jhash_2words(jhash(pckt->srcv6, 16, MAX_VIPS), in get_packet_hash()
205 pckt->ports, CH_RINGS_SIZE); in get_packet_hash()
207 return jhash_2words(pckt->src, pckt->ports, CH_RINGS_SIZE); in get_packet_hash()
211 struct packet_description *pckt, in get_packet_dst() argument
215 __u32 hash = get_packet_hash(pckt, is_ipv6); in get_packet_dst()
234 struct packet_description *pckt) in parse_icmpv6() argument
248 pckt->proto = ip6h->nexthdr; in parse_icmpv6()
249 pckt->flags |= F_ICMP; in parse_icmpv6()
250 memcpy(pckt->srcv6, ip6h->daddr.s6_addr32, 16); in parse_icmpv6()
251 memcpy(pckt->dstv6, ip6h->saddr.s6_addr32, 16); in parse_icmpv6()
256 struct packet_description *pckt) in parse_icmp() argument
273 pckt->proto = iph->protocol; in parse_icmp()
274 pckt->flags |= F_ICMP; in parse_icmp()
275 pckt->src = iph->daddr; in parse_icmp()
276 pckt->dst = iph->saddr; in parse_icmp()
281 struct packet_description *pckt) in parse_udp() argument
289 if (!(pckt->flags & F_ICMP)) { in parse_udp()
290 pckt->port16[0] = udp->source; in parse_udp()
291 pckt->port16[1] = udp->dest; in parse_udp()
293 pckt->port16[0] = udp->dest; in parse_udp()
294 pckt->port16[1] = udp->source; in parse_udp()
300 struct packet_description *pckt) in parse_tcp() argument
309 pckt->flags |= F_SYN_SET; in parse_tcp()
311 if (!(pckt->flags & F_ICMP)) { in parse_tcp()
312 pckt->port16[0] = tcp->source; in parse_tcp()
313 pckt->port16[1] = tcp->dest; in parse_tcp()
315 pckt->port16[0] = tcp->dest; in parse_tcp()
316 pckt->port16[1] = tcp->source; in parse_tcp()
325 struct packet_description pckt = {}; in process_packet() local
353 pckt.proto = protocol; in process_packet()
359 action = parse_icmpv6(data, data_end, off, &pckt); in process_packet()
364 memcpy(pckt.srcv6, ip6h->saddr.s6_addr32, 16); in process_packet()
365 memcpy(pckt.dstv6, ip6h->daddr.s6_addr32, 16); in process_packet()
375 pckt.proto = protocol; in process_packet()
382 action = parse_icmp(data, data_end, off, &pckt); in process_packet()
387 pckt.src = iph->saddr; in process_packet()
388 pckt.dst = iph->daddr; in process_packet()
391 protocol = pckt.proto; in process_packet()
394 if (!parse_tcp(data, off, data_end, &pckt)) in process_packet()
397 if (!parse_udp(data, off, data_end, &pckt)) in process_packet()
404 memcpy(vip.daddr.v6, pckt.dstv6, 16); in process_packet()
406 vip.daddr.v4 = pckt.dst; in process_packet()
408 vip.dport = pckt.port16[1]; in process_packet()
409 vip.protocol = pckt.proto; in process_packet()
416 pckt.port16[1] = 0; in process_packet()
420 pckt.port16[0] = 0; in process_packet()
422 if (!get_packet_dst(&dst, &pckt, vip_info, is_ipv6)) in process_packet()