Lines Matching refs:udp_hdr
247 struct udphdr *udp_hdr) in gen_udp_hdr() argument
249 udp_hdr->source = htons(ifobject->src_port); in gen_udp_hdr()
250 udp_hdr->dest = htons(ifobject->dst_port); in gen_udp_hdr()
251 udp_hdr->len = htons(UDP_PKT_SIZE); in gen_udp_hdr()
260 static void gen_udp_csum(struct udphdr *udp_hdr, struct iphdr *ip_hdr) in gen_udp_csum() argument
262 udp_hdr->check = 0; in gen_udp_csum()
263 udp_hdr->check = in gen_udp_csum()
264 udp_csum(ip_hdr->saddr, ip_hdr->daddr, UDP_PKT_SIZE, IPPROTO_UDP, (u16 *)udp_hdr); in gen_udp_csum()
697 struct udphdr *udp_hdr; in pkt_generate() local
708 udp_hdr = (struct udphdr *)(data + sizeof(struct ethhdr) + sizeof(struct iphdr)); in pkt_generate()
712 gen_udp_hdr(pkt_nb, data, ifobject, udp_hdr); in pkt_generate()
714 gen_udp_csum(udp_hdr, ip_hdr); in pkt_generate()