Home
last modified time | relevance | path

Searched refs:udph (Results 1 – 18 of 18) sorted by relevance

/external/wpa_supplicant_8/src/ap/
Dfils_hlp.c162 struct udphdr *udph; in fils_dhcp_handler() local
254 sizeof(*iph) + sizeof(*udph) + (end - pos) + 2); in fils_dhcp_handler()
264 iph->ip_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos)); in fils_dhcp_handler()
270 udph = wpabuf_put(resp, sizeof(*udph)); in fils_dhcp_handler()
271 udph->uh_sport = htons(DHCP_SERVER_PORT); in fils_dhcp_handler()
272 udph->uh_dport = htons(DHCP_CLIENT_PORT); in fils_dhcp_handler()
273 udph->uh_ulen = htons(sizeof(*udph) + (end - pos)); in fils_dhcp_handler()
274 udph->uh_sum = htons(0x0000); /* TODO: calculate checksum */ in fils_dhcp_handler()
483 const struct udphdr *udph; in fils_process_hlp_udp() local
486 if (len < sizeof(*iph) + sizeof(*udph)) in fils_process_hlp_udp()
[all …]
/external/linux-kselftest/tools/testing/selftests/net/
Dtxring_overwrite.c43 struct udphdr *udph; in build_packet() local
65 udph = buffer + off; in build_packet()
66 udph->dest = htons(8000); in build_packet()
67 udph->source = htons(8001); in build_packet()
68 udph->len = htons(blen - off); in build_packet()
69 udph->check = 0; in build_packet()
71 off += sizeof(*udph); in build_packet()
Dpsock_snd.c137 struct udphdr *udph = header; in build_udp_header() local
138 int len = sizeof(*udph) + payload_len; in build_udp_header()
140 udph->source = htons(9); in build_udp_header()
141 udph->dest = htons(cfg_port); in build_udp_header()
142 udph->len = htons(len); in build_udp_header()
145 udph->check = build_ip_csum(header - (2 * alen), alen, in build_udp_header()
146 htons(IPPROTO_UDP) + udph->len); in build_udp_header()
148 udph->check = 0; in build_udp_header()
150 return sizeof(*udph); in build_udp_header()
Dtxtimestamp.c415 static uint16_t get_udp_csum(const struct udphdr *udph, int alen) in get_udp_csum() argument
418 const void *csum_start = udph; in get_udp_csum()
421 pseudo_sum += udph->len; in get_udp_csum()
425 csum_len = ntohs(udph->len) + alen * 2; in get_udp_csum()
469 struct udphdr *udph = p; in fill_header_udp() local
471 udph->source = ntohs(dest_port + 1); /* spoof */ in fill_header_udp()
472 udph->dest = ntohs(dest_port); in fill_header_udp()
473 udph->len = ntohs(sizeof(*udph) + cfg_payload_len); in fill_header_udp()
474 udph->check = 0; in fill_header_udp()
476 udph->check = get_udp_csum(udph, is_ipv4 ? sizeof(struct in_addr) : in fill_header_udp()
/external/linux-kselftest/tools/testing/selftests/bpf/
Dtest_flow_dissector.c211 const struct udphdr *udph, in build_udp_v4_csum() argument
219 pseudo_sum += udph->len; in build_udp_v4_csum()
220 return build_ip_csum((void *) udph, num_words, pseudo_sum); in build_udp_v4_csum()
224 const struct udphdr *udph, in build_udp_v6_csum() argument
233 return build_ip_csum((void *) udph, num_words, pseudo_sum); in build_udp_v6_csum()
239 struct udphdr *udph = header; in build_udp_header() local
240 int len = sizeof(*udph) + payload_len; in build_udp_header()
242 udph->source = htons(cfg_src_port); in build_udp_header()
243 udph->dest = htons(dport); in build_udp_header()
244 udph->len = htons(len); in build_udp_header()
[all …]
/external/iputils/Modules/
Dpg3.c243 struct udphdr *udph; in fill_packet() local
258 udph = (struct udphdr*)skb_put(skb, sizeof( struct udphdr)); in fill_packet()
267 udph->source= htons(9); in fill_packet()
268 udph->dest= htons(9); in fill_packet()
269 udph->len= htons(datalen+8); /* DATA + udphdr */ in fill_packet()
270 udph->check=0; /* No checksum */ in fill_packet()
/external/toybox/toys/pending/
Ddhcp.c170 struct udphdr udph; member
660 if (bytes < (int) (sizeof(packet.iph) + sizeof(packet.udph))) { in read_raw()
673 || packet.udph.dest != htons(DHCPC_CLIENT_PORT) in read_raw()
674 || ntohs(packet.udph.len) != (uint16_t)(bytes - sizeof(packet.iph))) { in read_raw()
689 packet.iph.tot_len = packet.udph.len; in read_raw()
690 if (packet.udph.check != 0 && dhcp_checksum(&packet, bytes) != 0) { in read_raw()
694 memcpy(&state->pdhcp, &packet.dhcp, bytes - (sizeof(packet.iph) + sizeof(packet.udph))); in read_raw()
699 return bytes - sizeof(packet.iph) - sizeof(packet.udph); in read_raw()
749 packet.udph.source = htons(DHCPC_CLIENT_PORT); in send_raw()
750 packet.udph.dest = htons(DHCPC_SERVER_PORT); in send_raw()
[all …]
Ddhcpd.c164 struct udphdr udph; member
170 struct udphdr udph; member
884 packet.udph.source = htons(gconfig.port); //SERVER_PORT in send_packet6()
885 packet.udph.dest = gstate.client_port; //CLIENT_PORT in send_packet6()
886 packet.udph.len = htons(sizeof(dhcp6_raw_t) - sizeof(struct ip6_hdr) - padding); in send_packet6()
887 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = htons(ntohs(packet.udph.len) + 0x11); in send_packet6()
888 packet.udph.check = dhcp_checksum(&packet, sizeof(dhcp6_raw_t) - padding); in send_packet6()
890 packet.iph.ip6_ctlun.ip6_un1.ip6_un1_plen = packet.udph.len; in send_packet6()
936 packet.udph.source = htons(gconfig.port);//SERVER_PORT in send_packet()
937 packet.udph.dest = gstate.client_port; //CLIENT_PORT in send_packet()
[all …]
Ddhcp6.c114 struct udphdr udph; member
617 if (ntohs(mymsg->udph.dest) == 546 && in dhcp6_main()
/external/linux-kselftest/tools/testing/selftests/bpf/progs/
Dtest_tc_tunnel.c532 struct udphdr udph; in decap_internal() local
554 if (bpf_skb_load_bytes(skb, off + len, &udph, sizeof(udph)) < 0) in decap_internal()
556 switch (bpf_ntohs(udph.dest)) { in decap_internal()
Dtest_cls_redirect.c842 struct udphdr *udph = buf_assign(pkt, sizeof(_udp), &_udp); in process_udp() local
843 if (udph == NULL) { in process_udp()
850 fill_tuple(&tuple, iph, iphlen, udph->source, udph->dest); in process_udp()
/external/wpa_supplicant_8/src/common/
Ddhcp.h43 struct udphdr udph; member
/external/bcc/libbpf-tools/powerpc/
Dvmlinux_510.h118929 struct udphdr udph; member
Dvmlinux.h118929 struct udphdr udph; member
/external/bcc/libbpf-tools/arm64/
Dvmlinux.h105722 struct udphdr udph; member
Dvmlinux_510.h105722 struct udphdr udph; member
/external/bcc/libbpf-tools/x86/
Dvmlinux_505.h112092 struct udphdr udph; member
Dvmlinux.h112092 struct udphdr udph; member