/src/sys/external/bsd/ipf/netinet/ |
ip_netbios_pxy.c | 79 udphdr_t *udp; local in function:ipf_p_netbios_out 87 dlen = fin->fin_dlen - sizeof(*udp); 95 udp = (udphdr_t *)fin->fin_dp; 96 off = (char *)udp - (char *)ip + sizeof(*udp) + fin->fin_ipoff; 101 * udp header; 114 dgmbuf[4] = (char)((udp->uh_sport )&0xFF); 115 dgmbuf[5] = (char)((udp->uh_sport >> 8)&0xFF);
|
ip_tftp_pxy.c | 158 udphdr_t *udp; local in function:ipf_p_tftp_new 184 udp = (udphdr_t *)fin->fin_dp; 185 aps->aps_sport = udp->uh_sport; 186 aps->aps_dport = udp->uh_dport; 280 udphdr_t udp; local in function:ipf_p_tftp_backchannel 297 bzero((char *)&udp, sizeof(udp)); 298 udp.uh_sport = 0; /* XXX - don't specify remote port */ 299 udp.uh_dport = ti->ti_rule->in_ndport; 300 udp.uh_ulen = htons(sizeof(udp)) 410 udphdr_t *udp; local in function:ipf_p_tftp_client [all...] |
ip_rpcb_pxy.c | 15 * rdr <int> <e_ip>/32 port <e_p> -> <i_ip> port <i_p> udp proxy rpcbu 30 * o Only supports UDP. 601 /* within only the context of TCP/UDP over IP networks. */ 612 /* Decode r_netid. Must be "tcp" or "udp". */ 753 udphdr_t *udp; local in function:ipf_p_rpcb_modreq 794 udp = fin->fin_dp; 795 udp->uh_ulen = htons(ntohs(udp->uh_ulen) + diff); 974 /* Replies in max out at 2; TCP and/or UDP */ 1066 /* Must have 4 bytes for length & 4 bytes for "tcp" or "udp". * 1398 udphdr_t *udp; local in function:ipf_p_rpcb_fixlen [all...] |
ip_proxy.c | 77 #include <netinet/udp.h> 673 /* tcp(I) - pointer to TCP/UDP header */ 901 udphdr_t *udp = NULL; local in function:ipf_proxy_check 963 udp = (udphdr_t *)fin->fin_dp; 1018 * For both TCP and UDP, recalculate the layer 4 checksum, 1032 } else if ((udp != NULL) && (udp->uh_sum != 0)) { 1034 u_short sum = ntohs(udp->uh_sum); 1036 udp->uh_sum = htons(sum); 1038 udp->uh_sum = fr_cksum(fin, ip [all...] |
ip_nat6.c | 87 #include <netinet/udp.h> 1359 /* Check if the ICMP error message is related to an existing TCP, UDP or */ 1595 udphdr_t *udp; local in function:ipf_nat6_icmperror 1597 udp = (udphdr_t *)dp; 1599 csump = (u_short *)&udp->uh_sum; 1716 * Fix UDP pseudo header checksum to compensate for the 1723 * For offending TCP/UDP IP packets, translate the ports as 1727 * Since the port fields are part of the TCP/UDP checksum 1730 * be offset by the checksum change. However, the TCP/UDP 1757 * TCP/UDP header, given the changes in both the I [all...] |
ip_nat.c | 87 #include <netinet/udp.h> 477 "nat ipftq udp tab"); 3560 /* Check if the ICMP error message is related to an existing TCP, UDP or */ 3758 udphdr_t *udp; local in function:ipf_nat_icmperror 3760 udp = (udphdr_t *)dp; 3762 csump = (u_short *)&udp->uh_sum; 3870 * Fix UDP pseudo header checksum to compensate for the 3878 * For offending TCP/UDP IP packets, translate the ports as 3882 * Since the port fields are part of the TCP/UDP checksum 3885 * be offset by the checksum change. However, the TCP/UDP 5726 udphdr_t *udp; local in function:ipf_nat_proto [all...] |
fil.c | 88 # include <netinet/udp.h> 988 /* Analyse the packet for IPv6/UDP properties. */ 1500 /* Extract the UDP source and destination ports, if present. If compiled */ 1501 /* with IPFILTER_CKSUM, check to see if the UDP checksum is valid. */ 1506 udphdr_t *udp; local in function:ipf_pr_udpcommon 1511 if (ipf_pr_pullup(fin, sizeof(*udp)) == -1) { 1519 udp = fin->fin_dp; 1521 fin->fin_sport = ntohs(udp->uh_sport); 1522 fin->fin_dport = ntohs(udp->uh_dport); 1554 /* Analyse the packet for IPv4/UDP properties. * 6502 udphdr_t *udp; local in function:ipf_checkl4sum [all...] |
/src/usr.bin/rump_dhcpclient/ |
main.c | 96 uint8_t *udp; local in function:send_discover 103 ulen = make_udp_packet(&udp, (void *)dhcp, mlen, ia, ia); 104 if (send_raw_packet(ifp, ETHERTYPE_IP, udp, ulen) == -1) 112 uint8_t *udp; local in function:send_request 119 ulen = make_udp_packet(&udp, (void *)dhcp, mlen, ia, ia); 120 if (send_raw_packet(ifp, ETHERTYPE_IP, udp, ulen) == -1)
|
net.c | 44 #define __FAVOR_BSD /* Nasty glibc hack so we can use BSD semantics for UDP */ 45 #include <netinet/udp.h> 371 struct udphdr udp; member in struct:udp_dhcp_packet 405 struct udphdr *udp; local in function:make_udp_packet 409 udp = &udpp->udp; 413 * ip structure and an invalid ip_len (basically udp length). 414 * We then fill the udp structure and put the checksum 415 * of the whole packet into the udp checksum. 417 * If we don't do the ordering like so then the udp checksum will b [all...] |
/src/sys/net/npf/ |
npf_socket.c | 34 #include <netinet/udp.h> 128 struct udphdr *udp = npc->npc_l4.udp; local in function:npf_ip_socket 138 sport = udp->uh_sport; 139 dport = udp->uh_dport; 191 struct udphdr *udp = npc->npc_l4.udp; local in function:npf_ip6_socket 201 sport = udp->uh_sport; 202 dport = udp->uh_dport;
|
npf.h | 105 #include <netinet/udp.h> 148 #define NPC_UDP 0x20 /* UDP header. */ 187 /* TCP, UDP, ICMP or other protocols. */ 190 struct udphdr * udp; member in union:__anonb49106fe0208::__anonb49106fe040a
|
/src/tests/usr.sbin/inetd/ |
t_inetd.c | 52 #define UDP 17 67 "uses UDP/TCP ports 5432-5439 with localhost."); 165 int udp = create_socket("127.0.0.1", port, SOCK_DGRAM, UDP, 1, &addr); local in function:run_udp_client 167 CHECK_ERROR(sendto(udp, buffer, sizeof(buffer), 0, 182 ssize_t count = recvmsg(udp, &msg, 0); 186 CHECK_ERROR(close(udp)); 193 CHECK_ERROR(close(udp));
|
/src/sys/arch/mvme68k/stand/sboot/ |
etherfun.h | 40 #define IPP_UDP 17 /* IP Protocol is UDP */ 88 struct udp { struct 112 struct udp *udph = (struct udp *)(buf + sizeof(struct ether_header) + 115 sizeof(struct udp); 117 sizeof(struct ip) + sizeof(struct udp)); 119 sizeof(struct ip) + sizeof(struct udp));
|
/src/sys/fs/nfs/common/ |
nfsrvcache.h | 52 TAILQ_ENTRY(nfsrvcache) rc_lru; /* UDP lru chain */ 62 } udp; member in union:nfsrvcache::__anon67d9e4aa020a 79 #define rc_inet rc_un2.udp.haddr.had_inet.s_addr 80 #define rc_inet6 rc_un2.udp.haddr.had_inet6 81 #define rc_haddr rc_un2.udp.haddr
|
/src/sys/netipsec/ |
ipsec_output.c | 66 #include <netinet/udp.h> 153 struct udphdr *udp = NULL; local in function:ipsec_process_done 190 "failed to inject %u byte UDP for SA %s/%08lx\n", 197 udp = (struct udphdr *)(mtod(mo, char *) + roff); 198 udp->uh_sport = key_portfromsaddr(&saidx->src); 199 udp->uh_dport = key_portfromsaddr(&saidx->dst); 200 udp->uh_sum = 0; 201 udp->uh_ulen = htons(m->m_pkthdr.len - iphlen); 212 /* IPv4 packet does not have to be set UDP checksum. */ 230 /* IPv6 packet should be set UDP checksum. * [all...] |
/src/usr.sbin/mrinfo/ |
mrinfo.c | 393 int udp; local in function:main 405 if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0 406 || connect(udp, (struct sockaddr *) & addr, sizeof(addr)) < 0 407 || getsockname(udp, (struct sockaddr *) & addr, &addrlen) < 0) { 411 close(udp);
|
/src/usr.sbin/mrouted/ |
vif.c | 24 /* ioctls on raw IP sockets, we need a UDP */ 72 * (Open a UDP socket for ioctl use in the config procedures.) 75 logit(LOG_ERR, errno, "UDP socket"); 702 int udp; /* find best interface to reply on */ local in function:accept_neighbor_request 713 if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0 714 || connect(udp, (struct sockaddr *) &addr, sizeof(addr)) < 0 715 || getsockname(udp, (struct sockaddr *) &addr, &addrlen) < 0) { 717 close(udp); 720 close(udp); 789 int udp; /* find best interface to reply on * local in function:accept_neighbor_request2 [all...] |
/src/sys/kern/ |
uipc_mbufdebug.c | 53 #include <netinet/udp.h> 198 return("UDP"); 946 struct udphdr udp; local in function:m_examine_udp 949 if (pktlen < sizeof(udp)) { 951 pktlen, sizeof(udp)); 955 if (m_peek_data(m, off, sizeof(udp), (void *)(&udp)) < 0) { 959 off += sizeof(udp); 961 (*pr)("UDP: Src = %u\n", ntohs(udp.uh_sport)) [all...] |
/src/usr.sbin/map-mbone/ |
mapper.c | 875 int udp; local in function:main 886 if ((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0 887 || connect(udp, (struct sockaddr *) &addr, sizeof(addr)) < 0 888 || getsockname(udp, (struct sockaddr *) &addr, &addrlen) < 0) { 892 close(udp);
|
/src/sys/altq/ |
altq_subr.c | 63 #include <netinet/udp.h> 938 struct udphdr *udp; local in function:extract_ports4 940 udp = (struct udphdr *)(mtod(m0, char *) + off); 941 fin->fi_sport = udp->uh_sport; 942 fin->fi_dport = udp->uh_dport; 1023 struct udphdr *udp; local in function:extract_ports6 1025 udp = (struct udphdr *)(mtod(m0, char *) + off); 1026 fin6->fi6_sport = udp->uh_sport; 1027 fin6->fi6_dport = udp->uh_dport;
|
/src/sys/dev/pci/ |
if_vmxreg.h | 158 uint32_t csum_ok:1; /* TCP/UDP checksum ok */ 159 uint32_t udp:1; member in struct:vmxnet3_rxcompdesc
|
/src/usr.sbin/mtrace/ |
mtrace.c | 1144 int udp; local in function:main 1322 if (((udp = socket(AF_INET, SOCK_DGRAM, 0)) < 0) || 1323 (connect(udp, (struct sockaddr *) &addr, sizeof(addr)) < 0) || 1324 getsockname(udp, (struct sockaddr *) &addr, &addrlen) < 0) { 1331 * SunOS 5.X prior to SunOS 2.6, getsockname returns 0 for udp socket. 1364 dst_netmask = get_netmask(udp, qdst); 1365 close(udp);
|
/src/sys/dev/pci/igc/ |
if_igc.c | 3195 const bool udp = (csum_flags & (M_CSUM_UDPv4 | M_CSUM_UDPv6)) != 0; local in function:igc_tx_ctx_setup 3280 } else if (udp) {
|
/src/sys/netinet/ |
ip_mroute.c | 131 #include <netinet/udp.h> 2104 * XXX XXX: We're reading the UDP header, but we didn't ensure 2109 * The UDP port space is divided up into four priority ranges: 2116 struct udphdr *udp = (struct udphdr *)(((char *)ip) + (ip->ip_hl << 2)); local in function:priority 2118 switch (ntohs(udp->uh_dport) & 0xc000) { 2132 ntohs(udp->uh_dport), prio);
|
/src/sys/dist/pf/net/ |
pfvar.h | 110 #define PFTM_UDP_FIRST_PACKET_VAL 60 /* First UDP packet */ 1086 struct udphdr *udp; member in union:pf_pdesc::__anon30a5ecce1c0a 1175 /* UDP state enumeration */
|