/external/wpa_supplicant_8/src/ap/ |
D | fils_hlp.c | 162 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/ |
D | txring_overwrite.c | 43 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()
|
D | psock_snd.c | 137 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()
|
/external/linux-kselftest/tools/testing/selftests/bpf/ |
D | test_flow_dissector.c | 211 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/linux-kselftest/tools/testing/selftests/networking/timestamping/ |
D | txtimestamp.c | 320 static uint16_t get_udp_csum(const struct udphdr *udph, int alen) in get_udp_csum() argument 323 const void *csum_start = udph; in get_udp_csum() 326 pseudo_sum += udph->len; in get_udp_csum() 330 csum_len = ntohs(udph->len) + alen * 2; in get_udp_csum() 374 struct udphdr *udph = p; in fill_header_udp() local 376 udph->source = ntohs(dest_port + 1); /* spoof */ in fill_header_udp() 377 udph->dest = ntohs(dest_port); in fill_header_udp() 378 udph->len = ntohs(sizeof(*udph) + cfg_payload_len); in fill_header_udp() 379 udph->check = 0; in fill_header_udp() 381 udph->check = get_udp_csum(udph, is_ipv4 ? sizeof(struct in_addr) : in fill_header_udp()
|
/external/iputils/Modules/ |
D | pg3.c | 243 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/ |
D | dhcp.c | 170 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 …]
|
D | dhcpd.c | 164 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 …]
|
D | dhcp6.c | 114 struct udphdr udph; member 617 if (ntohs(mymsg->udph.dest) == 546 && in dhcp6_main()
|
/external/linux-kselftest/tools/testing/selftests/bpf/progs/ |
D | test_tc_tunnel.c | 451 struct udphdr udph; in decap_internal() local 473 if (bpf_skb_load_bytes(skb, off + len, &udph, sizeof(udph)) < 0) in decap_internal() 475 switch (bpf_ntohs(udph.dest)) { in decap_internal()
|
/external/wpa_supplicant_8/src/common/ |
D | dhcp.h | 43 struct udphdr udph; member
|