/Zephyr-Core-3.7.0/subsys/net/ip/ |
D | udp.c | 23 struct net_udp_hdr *udp_hdr; in net_udp_create() local 25 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_udp_create() 26 if (!udp_hdr) { in net_udp_create() 30 udp_hdr->src_port = src_port; in net_udp_create() 31 udp_hdr->dst_port = dst_port; in net_udp_create() 32 udp_hdr->len = 0U; in net_udp_create() 33 udp_hdr->chksum = 0U; in net_udp_create() 41 struct net_udp_hdr *udp_hdr; in net_udp_finalize() local 46 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_udp_finalize() 47 if (!udp_hdr) { in net_udp_finalize() [all …]
|
/Zephyr-Core-3.7.0/samples/net/promiscuous_mode/src/ |
D | main.c | 45 struct net_udp_hdr hdr, *udp_hdr; in get_ports() local 47 udp_hdr = net_udp_get_hdr(pkt, &hdr); in get_ports() 48 if (!udp_hdr) { in get_ports() 52 *src = ntohs(udp_hdr->src_port); in get_ports() 53 *dst = ntohs(udp_hdr->dst_port); in get_ports()
|
/Zephyr-Core-3.7.0/tests/net/dhcpv4/server/src/ |
D | main.c | 493 struct net_udp_hdr *udp_hdr; in verify_offer() local 501 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in verify_offer() 502 zassert_not_null(udp_hdr, "Failed to access UDP header."); in verify_offer() 524 zassert_equal(udp_hdr->src_port, htons(DHCPV4_SERVER_PORT), in verify_offer() 526 zassert_equal(udp_hdr->dst_port, htons(DHCPV4_CLIENT_PORT), in verify_offer() 667 struct net_udp_hdr *udp_hdr; in verify_ack() local 675 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in verify_ack() 676 zassert_not_null(udp_hdr, "Failed to access UDP header."); in verify_ack() 697 zassert_equal(udp_hdr->src_port, htons(DHCPV4_SERVER_PORT), in verify_ack() 699 zassert_equal(udp_hdr->dst_port, htons(DHCPV4_CLIENT_PORT), in verify_ack()
|
/Zephyr-Core-3.7.0/tests/net/checksum_offload/src/ |
D | main.c | 132 struct net_udp_hdr *udp_hdr; in get_udp_chksum() local 146 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in get_udp_chksum() 147 if (!udp_hdr) { in get_udp_chksum() 153 return udp_hdr->chksum; in get_udp_chksum() 236 struct net_udp_hdr *udp_hdr; in test_receiving() local 238 udp_hdr = (struct net_udp_hdr *) in test_receiving() 240 zassert_not_null(udp_hdr, "Can't access UDP header"); in test_receiving() 242 port = udp_hdr->src_port; in test_receiving() 243 udp_hdr->src_port = udp_hdr->dst_port; in test_receiving() 244 udp_hdr->dst_port = port; in test_receiving() [all …]
|
/Zephyr-Core-3.7.0/tests/net/context/src/ |
D | main.c | 1002 struct net_udp_hdr hdr, *udp_hdr; in tester_send() local 1040 udp_hdr = net_udp_get_hdr(pkt, &hdr); in tester_send() 1041 if (!udp_hdr) { in tester_send() 1046 port = udp_hdr->src_port; in tester_send() 1047 udp_hdr->src_port = udp_hdr->dst_port; in tester_send() 1048 udp_hdr->dst_port = port; in tester_send() 1049 net_udp_set_hdr(pkt, udp_hdr); in tester_send()
|
/Zephyr-Core-3.7.0/tests/net/traffic_class/src/ |
D | main.c | 171 struct net_udp_hdr hdr, *udp_hdr; in eth_tx() local 184 udp_hdr = net_udp_get_hdr(pkt, &hdr); in eth_tx() 185 zassert_not_null(udp_hdr, "UDP header missing"); in eth_tx() 187 port = udp_hdr->src_port; in eth_tx() 188 udp_hdr->src_port = udp_hdr->dst_port; in eth_tx() 189 udp_hdr->dst_port = port; in eth_tx()
|
/Zephyr-Core-3.7.0/tests/net/buf/src/ |
D | main.c | 58 struct udp_hdr { struct 325 struct udp_hdr *udp; in ZTEST() 336 #define PROTO_HEADERS (sizeof(struct ipv6_hdr) + sizeof(struct udp_hdr)) in ZTEST() 350 udp = (struct udp_hdr *)((uint8_t *)ipv6 + sizeof(*ipv6)); in ZTEST() 363 struct udp_hdr *udp; in ZTEST() 389 sizeof(struct udp_hdr))); in ZTEST() 403 udp = (struct udp_hdr *)((uint8_t *)ipv6 + sizeof(*ipv6)); in ZTEST()
|
/Zephyr-Core-3.7.0/subsys/net/lib/dhcpv4/ |
D | dhcpv4.c | 1917 struct net_udp_hdr *udp_hdr; in net_dhcpv4_accept_unicast() local 1938 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access); in net_dhcpv4_accept_unicast() 1939 if (udp_hdr == NULL) { in net_dhcpv4_accept_unicast() 1943 if (udp_hdr->dst_port != htons(DHCPV4_CLIENT_PORT)) { in net_dhcpv4_accept_unicast()
|
/Zephyr-Core-3.7.0/tests/net/6lo/src/ |
D | main.c | 309 struct net_udp_hdr *udp_hdr = net_pkt_get_data(pkt, &udp_access); in compare_udp_hdr() local 312 if (!udp_hdr) { in compare_udp_hdr() 319 res = memcmp((uint8_t *)udp_hdr, (uint8_t *)&data->nh.udp, in compare_udp_hdr()
|
/Zephyr-Core-3.7.0/doc/connectivity/networking/api/ |
D | net_pkt.rst | 330 struct net_udp_hdr *udp_hdr; 332 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, &udp_access);
|
/Zephyr-Core-3.7.0/subsys/net/lib/sockets/ |
D | sockets.c | 1160 struct net_udp_hdr *udp_hdr; in sock_get_pkt_src_addr() local 1162 udp_hdr = (struct net_udp_hdr *)net_pkt_get_data(pkt, in sock_get_pkt_src_addr() 1164 if (!udp_hdr) { in sock_get_pkt_src_addr() 1169 *port = udp_hdr->src_port; in sock_get_pkt_src_addr()
|