Lines Matching refs:pckt

205 static __always_inline __u32 get_packet_hash(struct packet_description *pckt,  in get_packet_hash()  argument
209 return jhash_2words(jhash(pckt->srcv6, 16, MAX_VIPS), in get_packet_hash()
210 pckt->ports, CH_RINGS_SIZE); in get_packet_hash()
212 return jhash_2words(pckt->src, pckt->ports, CH_RINGS_SIZE); in get_packet_hash()
216 struct packet_description *pckt, in get_packet_dst() argument
220 __u32 hash = get_packet_hash(pckt, is_ipv6) % RING_SIZE; in get_packet_dst()
235 struct packet_description *pckt) in parse_icmpv6() argument
249 pckt->proto = ip6h->nexthdr; in parse_icmpv6()
250 pckt->flags |= F_ICMP; in parse_icmpv6()
251 memcpy(pckt->srcv6, ip6h->daddr.s6_addr32, 16); in parse_icmpv6()
252 memcpy(pckt->dstv6, ip6h->saddr.s6_addr32, 16); in parse_icmpv6()
257 struct packet_description *pckt) in parse_icmp() argument
274 pckt->proto = iph->protocol; in parse_icmp()
275 pckt->flags |= F_ICMP; in parse_icmp()
276 pckt->src = iph->daddr; in parse_icmp()
277 pckt->dst = iph->saddr; in parse_icmp()
282 struct packet_description *pckt) in parse_udp() argument
290 if (!(pckt->flags & F_ICMP)) { in parse_udp()
291 pckt->port16[0] = udp->source; in parse_udp()
292 pckt->port16[1] = udp->dest; in parse_udp()
294 pckt->port16[0] = udp->dest; in parse_udp()
295 pckt->port16[1] = udp->source; in parse_udp()
301 struct packet_description *pckt) in parse_tcp() argument
310 pckt->flags |= F_SYN_SET; in parse_tcp()
312 if (!(pckt->flags & F_ICMP)) { in parse_tcp()
313 pckt->port16[0] = tcp->source; in parse_tcp()
314 pckt->port16[1] = tcp->dest; in parse_tcp()
316 pckt->port16[0] = tcp->dest; in parse_tcp()
317 pckt->port16[1] = tcp->source; in parse_tcp()
326 struct packet_description pckt = {}; in process_packet() local
354 pckt.proto = protocol; in process_packet()
360 action = parse_icmpv6(data, data_end, off, &pckt); in process_packet()
365 memcpy(pckt.srcv6, ip6h->saddr.s6_addr32, 16); in process_packet()
366 memcpy(pckt.dstv6, ip6h->daddr.s6_addr32, 16); in process_packet()
376 pckt.proto = protocol; in process_packet()
383 action = parse_icmp(data, data_end, off, &pckt); in process_packet()
388 pckt.src = iph->saddr; in process_packet()
389 pckt.dst = iph->daddr; in process_packet()
392 protocol = pckt.proto; in process_packet()
395 if (!parse_tcp(data, off, data_end, &pckt)) in process_packet()
398 if (!parse_udp(data, off, data_end, &pckt)) in process_packet()
405 memcpy(vip.daddr.v6, pckt.dstv6, 16); in process_packet()
407 vip.daddr.v4 = pckt.dst; in process_packet()
409 vip.dport = pckt.port16[1]; in process_packet()
410 vip.protocol = pckt.proto; in process_packet()
417 pckt.port16[1] = 0; in process_packet()
421 pckt.port16[0] = 0; in process_packet()
423 if (!get_packet_dst(&dst, &pckt, vip_info, is_ipv6)) in process_packet()