Home
last modified time | relevance | path

Searched refs:ntohs (Results 1 – 25 of 602) sorted by relevance

12345678910>>...25

/freebsd/sbin/ipf/libipf/
H A Dprintpacket6.c29 plen = ntohs(*((u_short *)buf +2)); in printpacket6()
41 ntohs(addrs[0]), ntohs(addrs[1]), ntohs(addrs[2]), in printpacket6()
42 ntohs(addrs[3]), ntohs(addrs[4]), ntohs(addrs[5]), in printpacket6()
43 ntohs(addrs[6]), ntohs(addrs[7])); in printpacket6()
46 (void)PRINTF(",%d", ntohs(tcp->th_sport)); in printpacket6()
50 ntohs(addrs[0]), ntohs(addrs[1]), ntohs(addrs[2]), in printpacket6()
51 ntohs(addrs[3]), ntohs(addrs[4]), ntohs(addrs[5]), in printpacket6()
52 ntohs(addrs[6]), ntohs(addrs[7])); in printpacket6()
55 PRINTF(",%d", ntohs(tcp->th_dport)); in printpacket6()
H A Dprintpacket.c28 len = ntohs(((ip6_t *)ip)->ip6_plen); in printpacket()
30 len = ntohs(((u_short *)ip)[2]); in printpacket()
34 len = ntohs(ip->ip_len); in printpacket()
70 off = ntohs(ip->ip_off); in printpacket()
72 PRINTF("ip #%d %d(%d) %d", ntohs(ip->ip_id), ntohs(ip->ip_len), in printpacket()
79 PRINTF(",%d", ntohs(tcp->th_sport)); in printpacket()
84 PRINTF(",%d", ntohs(tcp->th_dport)); in printpacket()
H A Dprintactivenat.c39 PRINTF(" %-5hu", ntohs(nat->nat_osport)); in printactivenat()
46 PRINTF(" %-5hu", ntohs(nat->nat_odport)); in printactivenat()
53 PRINTF(" %-5hu", ntohs(nat->nat_nsport)); in printactivenat()
59 PRINTF(" %-5hu", ntohs(nat->nat_ndport)); in printactivenat()
69 PRINTF(" %-5hu", ntohs(nat->nat_osport)); in printactivenat()
76 PRINTF(" %-5hu", ntohs(nat->nat_nsport)); in printactivenat()
83 PRINTF(" %hu", ntohs(nat->nat_odport)); in printactivenat()
93 PRINTF(" %-5hu", ntohs(nat->nat_ndport)); in printactivenat()
100 PRINTF(" %-5hu", ntohs(nat->nat_odport)); in printactivenat()
107 PRINTF(" %hu", ntohs(nat->nat_osport)); in printactivenat()
/freebsd/tests/sys/netinet/libalias/
H A D3_natin.c57 …pf1 = LibAliasRedirectPort(la, prv1, ntohs(0x1234), ext, ntohs(0x5678), masq, ntohs(0xabcd), IPPRO…
79 …pf2 = LibAliasRedirectPort(la, prv2, ntohs(0x1234), ext, ntohs(0), masq, ntohs(0xabcd), IPPROTO_UD…
100 …pf3 = LibAliasRedirectPort(la, prv3, ntohs(0x1234), ANY_ADDR, ntohs(0x5678), masq, ntohs(0xabcd), …
121 …pf4 = LibAliasRedirectPort(la, cgn, ntohs(0x1234), ANY_ADDR, ntohs(0), masq, ntohs(0xabcd), IPPROT…
159 …pf1 = LibAliasRedirectPort(la, prv2, ntohs(0x1234), ext, ntohs(0x5678), masq, ntohs(0xabcd), IPPRO…
172 …pf1 = LibAliasRedirectPort(la, prv1, ntohs(0x1234), ext, ntohs(0x5678), masq, ntohs(0xabcd), IPPRO…
184 …pf2 = LibAliasRedirectPort(la, prv2, ntohs(0x1234), ext, ntohs(0), masq, ntohs(0xabcd), IPPROTO_UD…
198 …pf3 = LibAliasRedirectPort(la, prv3, ntohs(0x1234), ANY_ADDR, ntohs(0x5678), masq, ntohs(0xabcd), …
213 …pf4 = LibAliasRedirectPort(la, cgn, ntohs(0x1234), ANY_ADDR, ntohs(0), masq, ntohs(0xabcd), IPPROT…
238 …pf = LibAliasRedirectPort(la, prv1, ntohs(0x1234), ANY_ADDR, 0, ANY_ADDR, ntohs(0xabcd), IPPROTO_U…
[all …]
/freebsd/tools/tools/netmap/
H A Dpkt_hash.c157 ntohs(0xFFFD) + seed, in decode_ip_n_hash()
158 ntohs(0xFFFE) + seed); in decode_ip_n_hash()
168 ntohs(tcph->th_sport) + seed, in decode_ip_n_hash()
169 ntohs(tcph->th_dport) + seed); in decode_ip_n_hash()
175 ntohs(udph->uh_sport) + seed, in decode_ip_n_hash()
176 ntohs(udph->uh_dport) + seed); in decode_ip_n_hash()
198 ntohs(0xFFFD) + seed, in decode_ip_n_hash()
199 ntohs(0xFFFE) + seed); in decode_ip_n_hash()
228 ntohs(0xFFFD) + seed, in decode_ipv6_n_hash()
229 ntohs(0xFFFE) + seed); in decode_ipv6_n_hash()
[all …]
/freebsd/sys/netinet/libalias/
H A Dalias_nbt.c85 if (ntohs(*ah->dport) == NETBIOS_DGM_PORT_NUMBER in fingerprint1()
86 || ntohs(*ah->sport) == NETBIOS_DGM_PORT_NUMBER) in fingerprint1()
103 if (ntohs(*ah->dport) == NETBIOS_NS_PORT_NUMBER in fingerprint2()
104 || ntohs(*ah->sport) == NETBIOS_NS_PORT_NUMBER) in fingerprint2()
347 pmax = (char *)uh + ntohs(uh->uh_ulen); in AliasHandleUdpNbt()
377 ntohs(ndh->source_port)); in AliasHandleUdpNbt()
398 ntohs(ndh->source_port)); in AliasHandleUdpNbt()
431 switch (ntohs(q->type)) { in AliasHandleQuestion()
438 printf("\nUnknown Type on Question %0x\n", ntohs(q->type)); in AliasHandleQuestion()
486 bcount = ntohs(q->rdlen); in AliasHandleResourceNB()
[all …]
H A Dalias_smedia.c138 ntohs(*ah->dport) == TFTP_PORT_NUMBER) in fingerprint()
143 if (ntohs(*ah->dport) == RTSP_CONTROL_PORT_NUMBER_1 in fingerprint()
144 || ntohs(*ah->sport) == RTSP_CONTROL_PORT_NUMBER_1 in fingerprint()
145 || ntohs(*ah->dport) == RTSP_CONTROL_PORT_NUMBER_2 in fingerprint()
146 || ntohs(*ah->sport) == RTSP_CONTROL_PORT_NUMBER_2) in fingerprint()
154 if (ntohs(*ah->dport) == TFTP_PORT_NUMBER) in protohandler()
251 tlen = ntohs(pip->ip_len); in alias_rtsp_out()
321 base_alias = ntohs(salias); in alias_rtsp_out()
355 sprintf(stemp, "%d", ntohs(salias)); in alias_rtsp_out()
364 sprintf(stemp, "%d", ntohs(ealias)); in alias_rtsp_out()
[all …]
H A Dalias_ftp.c113 if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || in fingerprint_out()
114 ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) in fingerprint_out()
124 if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || in fingerprint_in()
125 ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) in fingerprint_in()
231 tlen = ntohs(pip->ip_len); in AliasHandleFtpOut()
246 if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER) { in AliasHandleFtpOut()
269 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may have grown */ in AliasHandleFtpOut()
290 tlen = ntohs(pip->ip_len); in AliasHandleFtpIn()
303 ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER && in AliasHandleFtpIn()
318 tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may in AliasHandleFtpIn()
[all …]
/freebsd/sys/netinet/
H A Dtcp_seq.h48 #define WIN_LT(a,b) (ntohs(a) < ntohs(b))
49 #define WIN_LEQ(a,b) (ntohs(a) <= ntohs(b))
50 #define WIN_GT(a,b) (ntohs(a) > ntohs(b))
51 #define WIN_GEQ(a,b) (ntohs(a) >= ntohs(b))
H A Dip_reass.c237 ip->ip_len = htons(ntohs(ip->ip_len) - hlen); in ip_reass()
244 ((ip->ip_off & htons(IP_MF)) && (ntohs(ip->ip_len) & 0x7) != 0)) { in ip_reass()
254 ip->ip_off = htons(ntohs(ip->ip_off) << 3); in ip_reass()
259 if (ntohs(ip->ip_len) + ntohs(ip->ip_off) > IP_MAXPACKET) { in ip_reass()
338 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
354 i = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
362 fp->ipq_maxoff = ntohs(ip->ip_off) + ntohs(ip->ip_len); in ip_reass()
392 if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) in ip_reass()
405 i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - in ip_reass()
406 ntohs(ip->ip_off); in ip_reass()
[all …]
/freebsd/stand/libsa/
H A Dudp.c67 inet_ntoa(d->myip), ntohs(d->myport)); in sendudp()
69 inet_ntoa(d->destip), ntohs(d->destport)); in sendudp()
119 if (n == -1 || n < sizeof(*uh) || n != ntohs(uh->uh_ulen)) { in readudp()
128 d->myport, ntohs(uh->uh_dport)); in readudp()
140 n = ntohs(uh->uh_ulen) + sizeof(*ip); in readudp()
159 if (ntohs(uh->uh_ulen) < sizeof(*uh)) { in readudp()
163 ntohs(uh->uh_ulen), (int)sizeof(*uh)); in readudp()
169 n = (n > (ntohs(uh->uh_ulen) - sizeof(*uh))) ? in readudp()
170 ntohs(uh->uh_ulen) - sizeof(*uh) : n; in readudp()
H A Dip.c97 inet_ntoa(d->myip), ntohs(d->myport)); in sendip()
99 inet_ntoa(d->destip), ntohs(d->destport)); in sendip()
159 if ((ntohs(p->ipq_hdr->ip_off) & IP_OFFMASK) < in ip_reasm_add()
160 (ntohs(ip->ip_off) & IP_OFFMASK)) { in ip_reasm_add()
250 if (n < ntohs(ip->ip_len)) { in readipv4()
254 (int)n, ntohs(ip->ip_len)); in readipv4()
271 if ((ntohs(ip->ip_off) & IP_MF) == 0 && in readipv4()
272 (ntohs(ip->ip_off) & IP_OFFMASK) == 0) { in readipv4()
281 n = (n > (ntohs(ip->ip_len) - sizeof(*ip))) ? in readipv4()
282 ntohs(ip->ip_len) - sizeof(*ip) : n; in readipv4()
[all …]
/freebsd/contrib/unbound/iterator/
H A Diter_resptype.c80 if(ntohs(s->rk.type) == request->qtype && in response_type_from_cache()
81 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_cache()
88 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_cache()
132 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server()
169 ntohs(s->rk.type) == LDNS_RR_TYPE_NS && in response_type_from_server()
170 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server()
183 if(ntohs(s->rk.type) == request->qtype && in response_type_from_server()
184 ntohs(s->rk.rrset_class) == request->qclass && in response_type_from_server()
197 if(ntohs(s->rk.type) == LDNS_RR_TYPE_CNAME && in response_type_from_server()
220 if(ntohs(s->rk.type) == LDNS_RR_TYPE_SOA && in response_type_from_server()
[all …]
/freebsd/libexec/rbootd/
H A Dutils.c107 rmp->hp_llc.dsap, rmp->hp_llc.ssap, ntohs(rmp->hp_llc.cntrl)); in DispPkt()
111 ntohs(rmp->hp_llc.dxsap), ntohs(rmp->hp_llc.sxsap)); in DispPkt()
121 if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) { in DispPkt()
129 t, ntohs(rmp->r_brq.rmp_session), in DispPkt()
130 ntohs(rmp->r_brq.rmp_version)); in DispPkt()
140 t, ntohs(rmp->r_brpl.rmp_session), in DispPkt()
141 ntohs(rmp->r_brpl.rmp_version)); in DispPkt()
148 t, ntohs(rmp->r_rrq.rmp_session)); in DispPkt()
150 ntohs(rmp->r_rrq.rmp_size)); in DispPkt()
156 t, ntohs(rmp->r_rrpl.rmp_session)); in DispPkt()
[all …]
/freebsd/contrib/tcp_wrappers/
H A Drfc931.c183 ntohs(((struct sockaddr_in *)rmt_sin)->sin_port),
184 ntohs(((struct sockaddr_in *)our_sin)->sin_port));
186 ntohs(rmt_sin->sin_port),
187 ntohs(our_sin->sin_port));
204 && ntohs(((struct sockaddr_in *)rmt_sin)->sin_port) == rmt_port
205 && ntohs(((struct sockaddr_in *)our_sin)->sin_port) == our_port) {
207 && ntohs(rmt_sin->sin_port) == rmt_port
208 && ntohs(our_sin->sin_port) == our_port) {
/freebsd/contrib/pf/tftp-proxy/
H A Dtftp-proxy.c205 if (!(ntohs(tp->th_opcode) == RRQ || ntohs(tp->th_opcode) == WRQ)) { in main()
262 ntohs(((struct sockaddr_in *)&from)->sin_port), in main()
264 ntohs(((struct sockaddr_in *)&proxy)->sin_port), in main()
266 ntohs(((struct sockaddr_in *)&proxy_to_server)->sin_port), in main()
268 ntohs(((struct sockaddr_in *)&server)->sin_port), in main()
269 opcode(ntohs(tp->th_opcode)), in main()
280 (struct sockaddr *)&proxy_to_server, ntohs(sock_out.sin_port), in main()
282 ntohs(((struct sockaddr_in *)&from)->sin_port), in main()
292 ntohs(((struct sockaddr_in *)&from)->sin_port), in main()
299 ntohs(((struct sockaddr_in *)&from)->sin_port), in main()
[all …]
/freebsd/usr.sbin/ppp/
H A Dip.c241 datalen = ntohs(pip6->ip6_plen); in FilterCheck()
257 len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */ in FilterCheck()
273 datalen = ntohs(pip->ip_len) - (pip->ip_hl << 2); in FilterCheck()
354 sport = ntohs(uh->uh_sport); in FilterCheck()
355 dport = ntohs(uh->uh_dport); in FilterCheck()
372 sport = ntohs(th->th_sport); in FilterCheck()
373 dport = ntohs(th->th_dport); in FilterCheck()
505 len = ntohs(uh->uh_ulen) - sizeof *uh; in ip_LogDNS()
515 *hptr++ = ntohs(*pktptr); /* Careful of macro side-effects ! */ in ip_LogDNS()
543 qtype = dns_Qtype2Txt(ntohs(tmp)); in ip_LogDNS()
[all …]
H A Dslcompress.c137 (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
140 (f) = htons(ntohs(f) + (u_int32_t)*cp++); \
287 deltaS = ntohs(th->th_urp); in sl_compress_tcp()
299 deltaS = (u_short) (ntohs(th->th_win) - ntohs(oth->th_win)); in sl_compress_tcp()
332 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp()
348 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
356 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
364 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in sl_compress_tcp()
376 deltaA = ntohs(th->th_sum); in sl_compress_tcp()
511 register u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp()
[all …]
/freebsd/usr.sbin/bluetooth/sdpcontrol/
H A Dsearch.c134 ntohs(*(uint16_t *)&uuid.b[4]), in print_service_class_id_list()
135 ntohs(*(uint16_t *)&uuid.b[6]), in print_service_class_id_list()
136 ntohs(*(uint16_t *)&uuid.b[8]), in print_service_class_id_list()
137 ntohs(*(uint16_t *)&uuid.b[10]), in print_service_class_id_list()
195 ntohs(*(uint16_t *)&value.int128.b[4]), in print_protocol_descriptor()
196 ntohs(*(uint16_t *)&value.int128.b[6]), in print_protocol_descriptor()
197 ntohs(*(uint16_t *)&value.int128.b[8]), in print_protocol_descriptor()
198 ntohs(*(uint16_t *)&value.int128.b[10]), in print_protocol_descriptor()
260 ntohs(*(uint16_t *)&value.int128.b[4]), in print_protocol_descriptor()
261 ntohs(*(uint16_ in print_protocol_descriptor()
[all...]
/freebsd/cddl/lib/libdtrace/
H A Dudp.d55 udps_lport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_lport);
56 udps_rport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_fport);
69 udp_sport = p == NULL ? 0 : ntohs(p->uh_sport);
70 udp_dport = p == NULL ? 0 : ntohs(p->uh_dport);
71 udp_length = p == NULL ? 0 : ntohs(p->uh_ulen);
72 udp_checksum = p == NULL ? 0 : ntohs(p->uh_sum);
H A Dudplite.d56 udplites_lport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_lport);
57 udplites_rport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_fport);
70 udplite_sport = p == NULL ? 0 : ntohs(p->uh_sport);
71 udplite_dport = p == NULL ? 0 : ntohs(p->uh_dport);
72 udplite_coverage = p == NULL ? 0 : ntohs(p->uh_ulen);
73 udplite_checksum = p == NULL ? 0 : ntohs(p->uh_sum);
H A Dip.d230 ntohs(((struct ip *)p)->ip_len) - (((struct ip *)p)->ip_hl << 2):
231 ntohs(((struct ip6_hdr *)p)->ip6_ctlun.ip6_un1.ip6_un1_plen);
247 ntohs(((struct ip *)m->m_data)->ip_len) -
249 ntohs(((struct ip6_hdr *)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen);
275 ipv4_length = p == NULL ? 0 : ntohs(p->ip_len);
276 ipv4_ident = p == NULL ? 0 : ntohs(p->ip_id);
277 ipv4_flags = p == NULL ? 0 : (ntohs(p->ip_off) & 0xe000) >> 8;
278 ipv4_offset = p == NULL ? 0 : ntohs(p->ip_off) & 0x1fff;
282 ipv4_checksum = p == NULL ? 0 : ntohs(p->ip_sum);
295 ipv6_plen = p == NULL ? 0 : ntohs(p->ip6_ctlun.ip6_un1.ip6_un1_plen);
/freebsd/contrib/unbound/validator/
H A Dval_utils.c86 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_SOA) in val_classify_response()
88 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_DS) in val_classify_response()
90 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_NS) in val_classify_response()
98 ntohs(rep->rrsets[0]->rk.type) == LDNS_RR_TYPE_NS && in val_classify_response()
127 ntohs(rep->rrsets[i]->rk.type) in val_classify_response()
136 if(ntohs(rep->rrsets[i]->rk.type) in val_classify_response()
149 ntohs(rep->rrsets[i]->rk.type) == qinf->qtype) in val_classify_response()
151 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_CNAME) in val_classify_response()
252 if(ntohs(rep->rrsets[i]->rk.type) == LDNS_RR_TYPE_DNAME && in cname_under_previous_dname()
284 ntohs(rep->rrsets[i]->rk.type) == in val_find_signer()
[all …]
/freebsd/contrib/llvm-project/lldb/source/Host/common/
H A DSocketAddress.cpp58 tmp, sizeof(tmp), "%x:%x:%x:%x:%x:%x:%x:%x", ntohs(src16[0]), in inet_ntop()
59 ntohs(src16[1]), ntohs(src16[2]), ntohs(src16[3]), ntohs(src16[4]), in inet_ntop()
60 ntohs(src16[5]), ntohs(src16[6]), ntohs(src16[7])); in inet_ntop()
158 return ntohs(m_socket_addr.sa_ipv4.sin_port); in GetPort()
160 return ntohs(m_socket_add in GetPort()
[all...]
/freebsd/sys/net/
H A Dslcompress.c123 (f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
126 (f) = htons(ntohs(f) + (u_int32_t)*cp++); \
275 deltaS = ntohs(th->th_urp); in sl_compress_tcp()
285 deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); in sl_compress_tcp()
318 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp()
333 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
341 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
349 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in sl_compress_tcp()
360 deltaA = ntohs(th->th_sum); in sl_compress_tcp()
526 u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp_core()
[all …]

12345678910>>...25