crypto/libressl/apps/nc/netcat.c
1492
return ntohs(entry->s_port);
crypto/libressl/apps/nc/netcat.c
732
ntohs(atoi(portlist[i])),
crypto/libressl/apps/nc/socks.c
331
host, ntohs(serverport));
crypto/libressl/apps/nc/socks.c
335
host, ntohs(serverport));
crypto/libressl/apps/openssl/s_client.c
1796
ntohs(ladd.sin_port));
crypto/libressl/apps/openssl/s_socket.c
324
*port_ptr = ntohs((unsigned short) s->s_port);
crypto/libressl/crypto/bio/b_sock.c
86
*port_ptr = ntohs(((struct sockaddr_in *)(res->ai_addr))->sin_port);
crypto/openssh/channels.c
1532
c->host_port = ntohs(s4_req.dest_port);
crypto/openssh/channels.c
1669
c->host_port = ntohs(dest_port);
crypto/openssh/misc.c
525
return ntohs(se->s_port);
crypto/openssh/readconf.c
525
port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
games/hunt/hunt/hunt.c
167
Server_port = ntohs(se->s_port);
games/hunt/hunt/list.c
121
driver->response = ntohs(resp);
games/hunt/huntd/driver.c
1159
ntohs(((struct sockaddr_in *)&fromaddr)->sin_port));
games/hunt/huntd/driver.c
1168
query = ntohs(query);
games/hunt/huntd/driver.c
1196
response = ntohs(response);
games/hunt/huntd/driver.c
383
stat_port = ntohs(addr.sin_port);
games/hunt/huntd/driver.c
406
sock_port = ntohs(addr.sin_port);
games/hunt/huntd/driver.c
418
Server_port = ntohs(se->s_port);
games/hunt/huntd/driver.c
433
Server_port = ntohs(test_port.sin_port);
lib/libalias/alias.c
1033
if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER
lib/libalias/alias.c
1034
|| ntohs(tc->th_sport) == FTP_CONTROL_PORT_NUMBER)
lib/libalias/alias.c
1036
else if (ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_1
lib/libalias/alias.c
1037
|| ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_2)
lib/libalias/alias.c
1039
else if (ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1
lib/libalias/alias.c
1040
|| ntohs(tc->th_sport) == RTSP_CONTROL_PORT_NUMBER_1
lib/libalias/alias.c
1041
|| ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2
lib/libalias/alias.c
1042
|| ntohs(tc->th_sport) == RTSP_CONTROL_PORT_NUMBER_2)
lib/libalias/alias.c
1044
else if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER
lib/libalias/alias.c
1045
|| ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER)
lib/libalias/alias.c
1244
if (ntohs(pip->ip_len) > maxpacketsize
lib/libalias/alias.c
1249
if ( (ntohs(pip->ip_off) & IP_OFFMASK) == 0 )
lib/libalias/alias.c
1274
if (ntohs(pip->ip_off) & IP_MF)
lib/libalias/alias.c
1336
if (ntohs(pip->ip_len) > maxpacketsize
lib/libalias/alias.c
1362
if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0)
lib/libalias/alias.c
1410
if (ntohs(pip->ip_len) > maxpacketsize
lib/libalias/alias.c
762
if (ntohs(ud->uh_dport) == CUSEEME_PORT_NUMBER)
lib/libalias/alias.c
765
else if (ntohs(ud->uh_dport) == NETBIOS_DGM_PORT_NUMBER
lib/libalias/alias.c
766
|| ntohs(ud->uh_sport) == NETBIOS_DGM_PORT_NUMBER)
lib/libalias/alias.c
768
else if (ntohs(ud->uh_dport) == NETBIOS_NS_PORT_NUMBER
lib/libalias/alias.c
769
|| ntohs(ud->uh_sport) == NETBIOS_NS_PORT_NUMBER)
lib/libalias/alias.c
826
if (ntohs(ud->uh_dport) == CUSEEME_PORT_NUMBER)
lib/libalias/alias.c
829
else if (ntohs(ud->uh_dport) == NETBIOS_DGM_PORT_NUMBER
lib/libalias/alias.c
830
|| ntohs(ud->uh_sport) == NETBIOS_DGM_PORT_NUMBER)
lib/libalias/alias.c
832
else if (ntohs(ud->uh_dport) == NETBIOS_NS_PORT_NUMBER
lib/libalias/alias.c
833
|| ntohs(ud->uh_sport) == NETBIOS_NS_PORT_NUMBER)
lib/libalias/alias.c
841
else if (ntohs(ud->uh_dport) == TFTP_PORT_NUMBER)
lib/libalias/alias.c
897
if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER
lib/libalias/alias.c
898
|| ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER)
lib/libalias/alias_cuseeme.c
108
end = (char *)ud + ntohs(ud->uh_ulen);
lib/libalias/alias_cuseeme.c
113
if(ntohs(cu->data_type) == 101)
lib/libalias/alias_cuseeme.c
74
if (ntohs(ud->uh_ulen) - sizeof(struct udphdr) >= sizeof(struct cu_header)) {
lib/libalias/alias_db.c
2169
tlen = ntohs(pip->ip_len);
lib/libalias/alias_db.c
2801
GetOriginalAddress(link), ntohs(GetOriginalPort(link)),
lib/libalias/alias_db.c
2802
GetDestAddress(link), ntohs(GetDestPort(link)) );
lib/libalias/alias_db.c
2809
GetDestAddress(link), ntohs(GetDestPort(link)),
lib/libalias/alias_db.c
2810
GetOriginalAddress(link), ntohs(GetOriginalPort(link)) );
lib/libalias/alias_db.c
620
port_sys = ntohs(port_net);
lib/libalias/alias_db.c
798
port_sys = ntohs(src_port);
lib/libalias/alias_ftp.c
117
tlen = ntohs(pip->ip_len);
lib/libalias/alias_ftp.c
131
if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER) {
lib/libalias/alias_ftp.c
159
tlen = ntohs(pip->ip_len); /* recalc tlen, pkt may have grown */
lib/libalias/alias_ftp.c
486
tlen = ntohs(pip->ip_len);
lib/libalias/alias_ftp.c
527
a1,a2,a3,a4,ntohs(alias_port));
lib/libalias/alias_ftp.c
532
ntohs(alias_port));
lib/libalias/alias_irc.c
83
tlen = ntohs(pip->ip_len);
lib/libalias/alias_nbt.c
213
pmax = (char *)uh + ntohs( uh->uh_ulen );
lib/libalias/alias_nbt.c
242
printf("%s:%d-->", inet_ntoa(ndh->source_ip), ntohs(ndh->source_port) );
lib/libalias/alias_nbt.c
261
printf("%s:%d\n", inet_ntoa(ndh->source_ip), ntohs(ndh->source_port) );
lib/libalias/alias_nbt.c
293
switch ( ntohs(q->type) ) {
lib/libalias/alias_nbt.c
300
printf("\nUnknown Type on Question %0x\n", ntohs(q->type) );
lib/libalias/alias_nbt.c
344
bcount = ntohs(q->rdlen);
lib/libalias/alias_nbt.c
417
bcount = ntohs(q->rdlen);
lib/libalias/alias_nbt.c
474
bcount = ntohs(q->rdlen);
lib/libalias/alias_nbt.c
507
bcount = ntohs(q->rdlen);
lib/libalias/alias_nbt.c
538
bcount = ntohs(q->rdlen);
lib/libalias/alias_nbt.c
561
printf("type=%02x, count=%d\n", ntohs(q->type), count );
lib/libalias/alias_nbt.c
565
switch ( ntohs(q->type) ) {
lib/libalias/alias_nbt.c
605
ntohs(q->type)
lib/libalias/alias_nbt.c
641
pmax = (char *)uh + ntohs( uh->uh_ulen );
lib/libalias/alias_nbt.c
654
ntohs(nsh->qdcount),
lib/libalias/alias_nbt.c
655
ntohs(nsh->ancount),
lib/libalias/alias_nbt.c
656
ntohs(nsh->nscount),
lib/libalias/alias_nbt.c
657
ntohs(nsh->arcount),
lib/libalias/alias_nbt.c
663
if (ntohs(nsh->qdcount) !=0 ) {
lib/libalias/alias_nbt.c
665
ntohs(nsh->qdcount),
lib/libalias/alias_nbt.c
673
if (ntohs(nsh->ancount) !=0 ) {
lib/libalias/alias_nbt.c
675
ntohs(nsh->ancount),
lib/libalias/alias_nbt.c
683
if (ntohs(nsh->nscount) !=0 ) {
lib/libalias/alias_nbt.c
685
ntohs(nsh->nscount),
lib/libalias/alias_nbt.c
693
if (ntohs(nsh->arcount) !=0 ) {
lib/libalias/alias_nbt.c
695
ntohs(nsh->arcount),
lib/libalias/alias_pptp.c
285
tlen = ntohs(pip->ip_len);
lib/libalias/alias_pptp.c
296
*ptype = ntohs(hptr->type);
lib/libalias/alias_pptp.c
299
if ((ntohs(hptr->msgType) != PPTP_CTRL_MSG_TYPE) ||
lib/libalias/alias_proxy.c
193
*port = (u_int) ntohs(se->s_port);
lib/libalias/alias_proxy.c
303
inet_ntoa(GetProxyAddress (link)), (u_int) ntohs(GetProxyPort (link)));
lib/libalias/alias_proxy.c
319
if ((ntohs(pip->ip_len) + strlen(buffer)) > maxpacketsize)
lib/libalias/alias_proxy.c
329
dlen = ntohs (pip->ip_len) - hlen;
lib/libalias/alias_proxy.c
357
pip->ip_len = htons(ntohs(pip->ip_len) + slen);
lib/libalias/alias_proxy.c
395
memcpy(ptr + OPTION_LEN_BYTES, ptr, ntohs(pip->ip_len) - 20);
lib/libalias/alias_proxy.c
425
pip->ip_len = htons(ntohs(pip->ip_len) + OPTION_LEN_BYTES);
lib/libalias/alias_smedia.c
160
tlen = ntohs(pip->ip_len);
lib/libalias/alias_smedia.c
235
base_alias = ntohs(salias);
lib/libalias/alias_smedia.c
263
sprintf(stemp, "%d", ntohs(salias));
lib/libalias/alias_smedia.c
272
sprintf(stemp, "%d", ntohs(ealias));
lib/libalias/alias_smedia.c
340
if (ntohs(msg_id) == 0) {
lib/libalias/alias_smedia.c
344
if ((ntohs(msg_id) == 1) || (ntohs(msg_id) == 7)) {
lib/libalias/alias_smedia.c
362
work += ntohs(msg_len);
lib/libalias/alias_smedia.c
381
tlen = ntohs(pip->ip_len);
lib/libalias/alias_smedia.c
388
if ((ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1) ||
lib/libalias/alias_smedia.c
389
(ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2)) {
lib/libalias/alias_util.c
101
ntcp = ntohs(pip->ip_len) - nhdr;
lib/libc/net/getaddrinfo.c
1745
ancount = ntohs(hp->ancount);
lib/libc/net/getaddrinfo.c
1746
qdcount = ntohs(hp->qdcount);
lib/libc/net/getaddrinfo.c
2438
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
lib/libc/net/getaddrinfo.c
2443
ntohs(hp->ancount));
lib/libc/net/getaddrinfo.c
2448
ancount += ntohs(hp->ancount);
lib/libc/net/gethostbydns.c
172
ancount = ntohs(hp->ancount);
lib/libc/net/gethostbydns.c
173
qdcount = ntohs(hp->qdcount);
lib/libc/net/getnameinfo.c
168
snprintf(numserv, sizeof(numserv), "%u", ntohs(port));
lib/libc/net/getnetbydns.c
182
ancount = ntohs(hp->ancount); /* #/records in the answer section */
lib/libc/net/getnetbydns.c
183
qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
lib/libc/net/getservent.c
534
snprintf(buf, sizeof(buf), "%d/%s", ntohs(port),
lib/libc/net/hesiod.c
377
ancount = ntohs(hp->ancount);
lib/libc/net/hesiod.c
378
qdcount = ntohs(hp->qdcount);
lib/libc/net/rcmd.c
118
snprintf(num, sizeof(num), "%d", ntohs(rport));
lib/libc/net/rcmd.c
248
aport = ntohs(((struct sockaddr_in *)&from)->sin_port);
lib/libc/net/rcmd.c
252
aport = ntohs(((struct sockaddr_in6 *)&from)->sin6_port);
lib/libc/net/rcmd.c
360
*alport = (int)ntohs(*sport);
lib/libc/net/rcmdsh.c
90
snprintf(num, sizeof(num), "%u", (unsigned int)ntohs(rport));
lib/libc/resolv/res_mkquery.c
249
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libc/resolv/res_mkupdate.c
1113
port = ntohs(port);
lib/libc/resolv/res_mkupdate.c
990
slp->port = ntohs((u_int16_t)sp->s_port); /*%< host byt order */
lib/libc/resolv/res_query.c
170
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
lib/libc/resolv/res_query.c
175
ntohs(hp->ancount),
lib/libc/resolv/res_query.c
176
ntohs(hp->nscount),
lib/libc/resolv/res_query.c
177
ntohs(hp->arcount));
lib/libc/resolv/res_send.c
232
int qdcount = ntohs(((const HEADER*)buf)->qdcount);
lib/libc/resolv/res_send.c
270
int qdcount = ntohs(((const HEADER*)buf1)->qdcount);
lib/libc/resolv/res_send.c
283
if (qdcount != ntohs(((const HEADER*)buf2)->qdcount))
lib/libc/rpc/rpc_generic.c
610
port = ntohs(sin->sin_port);
lib/libc/rpc/rpc_generic.c
621
port = ntohs(sin6->sin6_port);
lib/libc/rpc/rpc_soc.c
232
svc->xp_port = ntohs(port);
lib/libc/yp/yplib.c
468
if (ntohs(clnt_sin.sin_port) >= IPPORT_RESERVED) {
lib/libcompat/4.3/rexec.c
313
snprintf(servbuff, sizeof(servbuff), "%d", ntohs(rport));
lib/libcompat/4.3/rexec.c
494
port = ntohs((u_short)sin2.sin_port);
lib/libfetch/common.c
251
return (ntohs(se->s_port));
lib/libfetch/ftp.c
824
p = ntohs(sin4->sin_port);
lib/libfetch/ftp.c
853
(ntohs(sin6->sin6_port) >> 8) & 0xff,
lib/libfetch/ftp.c
854
ntohs(sin6->sin6_port) & 0xff);
lib/libftpio/ftpio.c
1024
(ntohs(sin.sin4.sin_port) >> 8) & 0xff,
lib/libftpio/ftpio.c
1025
ntohs(sin.sin4.sin_port) & 0xff);
lib/libftpio/ftpio.c
994
(ntohs(sin.sin4.sin_port) >> 8) & 0xff,
lib/libftpio/ftpio.c
995
ntohs(sin.sin4.sin_port) & 0xff);
lib/libipfw3/basic/ipfw3_basic.c
214
return ntohs(se->s_port);
lib/libldns/ldns/util.h
73
return ntohs(*(const uint16_t *) src);
lib/libsdp/search.c
198
xpdu.pdu.tid = ntohs(xpdu.pdu.tid);
lib/libsdp/search.c
199
xpdu.pdu.len = ntohs(xpdu.pdu.len);
lib/libsdp/search.c
200
xpdu.len = ntohs(xpdu.len);
lib/libsdp/service.c
253
pdu.tid = ntohs(pdu.tid);
lib/libsdp/service.c
254
pdu.len = ntohs(pdu.len);
lib/libutil/sockaddr_snprintf.c
135
p = ntohs(sin4->sin_port);
lib/libutil/sockaddr_snprintf.c
141
p = ntohs(sin6->sin6_port);
libexec/bootpd/bootpd.c
1265
msgsz = ntohs(msgsz);
libexec/bootpd/bootpd.c
237
bootps_port = ntohs(bind_addr.sin_port);
libexec/bootpd/bootpd.c
440
bootps_port = ntohs((u_short) servp->s_port);
libexec/bootpd/bootpd.c
467
bootpc_port = ntohs(servp->s_port);
libexec/bootpd/bootpd.c
735
u_int32 t = (u_int32) ntohs(bp->bp_secs);
libexec/bootpd/bootpgw/bootpgw.c
207
bootps_port = ntohs(bind_addr.sin_port);
libexec/bootpd/bootpgw/bootpgw.c
396
bootps_port = ntohs((u_short) servp->s_port);
libexec/bootpd/bootpgw/bootpgw.c
422
bootpc_port = ntohs(servp->s_port);
libexec/bootpd/bootpgw/bootpgw.c
527
secs = ntohs(bp->bp_secs);
libexec/bootpd/tools/bootptest/bootptest.c
243
bootps_port = ntohs((u_short) sep->s_port);
libexec/bootpd/tools/bootptest/bootptest.c
278
bootpc_port = ntohs(sep->s_port);
libexec/bootpd/tools/bootptest/print-bootp.c
123
printf(" secs:%d", ntohs(bp->bp_secs));
libexec/bootpd/tools/bootptest/print-bootp.c
323
printf("%d", ntohs(us));
libexec/ftpd/ftpcmd.y
1668
((ntohs(data_dest.su_port) < IPPORT_RESERVED) ||
libexec/ftpd/ftpcmd.y
1795
((ntohs(data_dest.su_port) < IPPORT_RESERVED) ||
libexec/ftpd/ftpd.c
3002
ntohs(pasv_addr.su_port));
libexec/ftpd/ftpd.c
536
dataport = ntohs(ctrl_addr.su_port) - 1; /* as per RFC 959 */
libexec/ftpd/ftpd.c
556
data_source.su_port = htons(ntohs(ctrl_addr.su_port) - 1);
libexec/rbootd/rmp_var.h
143
(i) = (((u_int32_t)ntohs((w).val[_WORD_HIGHPART])) << 16) | ntohs((w).val[_WORD_LOWPART])
libexec/rbootd/rmpproto.c
107
if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) {
libexec/rbootd/rmpproto.c
420
if (ntohs(req->r_rrq.rmp_session) !=
libexec/rbootd/rmpproto.c
421
((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session):
libexec/rbootd/rmpproto.c
422
ntohs(rpl->r_rrpl.rmp_session))) {
libexec/rbootd/rmpproto.c
438
if (ntohs(req->r_rrq.rmp_size) > RMPREADDATA)
libexec/rbootd/rmpproto.c
457
(int) ntohs(req->r_rrq.rmp_size))) <= 0) {
libexec/rbootd/rmpproto.c
524
if (ntohs(rconn->rmp.r_rrq.rmp_session) !=
libexec/rbootd/rmpproto.c
525
((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session):
libexec/rbootd/rmpproto.c
526
ntohs(rpl->r_rrpl.rmp_session))) {
libexec/rbootd/utils.c
109
rmp->hp_llc.dsap, rmp->hp_llc.ssap, ntohs(rmp->hp_llc.cntrl));
libexec/rbootd/utils.c
113
ntohs(rmp->hp_llc.dxsap), ntohs(rmp->hp_llc.sxsap));
libexec/rbootd/utils.c
123
if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) {
libexec/rbootd/utils.c
131
t, ntohs(rmp->r_brq.rmp_session),
libexec/rbootd/utils.c
132
ntohs(rmp->r_brq.rmp_version));
libexec/rbootd/utils.c
142
t, ntohs(rmp->r_brpl.rmp_session),
libexec/rbootd/utils.c
143
ntohs(rmp->r_brpl.rmp_version));
libexec/rbootd/utils.c
150
t, ntohs(rmp->r_rrq.rmp_session));
libexec/rbootd/utils.c
152
ntohs(rmp->r_rrq.rmp_size));
libexec/rbootd/utils.c
158
t, ntohs(rmp->r_rrpl.rmp_session));
libexec/rbootd/utils.c
166
ntohs(rmp->r_done.rmp_session));
libexec/talkd/process.c
74
mp->addr.sa_family = ntohs(mp->addr.sa_family);
libexec/talkd/process.c
81
mp->ctl_addr.sa_family = ntohs(mp->ctl_addr.sa_family);
libexec/tftpd/tftpd.c
301
tp->th_opcode = ntohs(tp->th_opcode);
libexec/tftpd/tftpd.c
625
ap->th_opcode = ntohs((u_short)ap->th_opcode);
libexec/tftpd/tftpd.c
626
ap->th_block = ntohs((u_short)ap->th_block);
libexec/tftpd/tftpd.c
689
dp->th_opcode = ntohs((u_short)dp->th_opcode);
libexec/tftpd/tftpd.c
690
dp->th_block = ntohs((u_short)dp->th_block);
libexec/tftpd/tftpd.c
859
ap->th_opcode = ntohs((u_short)ap->th_opcode);
libexec/tftpd/tftpd.c
860
ap->th_block = ntohs((u_short)ap->th_block);
sbin/dhclient/convert.c
73
return (ntohs(ibuf));
sbin/dhclient/convert.c
82
return (ntohs(ibuf));
sbin/dhclient/dhclient.c
1036
ntohs(sockaddr_broadcast.sin_port), client->interval);
sbin/dhclient/dhclient.c
1225
inet_ntoa(destination.sin_addr), ntohs(destination.sin_port));
sbin/dhclient/dhclient.c
1237
ntohs(sockaddr_broadcast.sin_port));
sbin/dhclient/packet.c
140
IPPROTO_UDP + (u_int32_t)ntohs(udp.uh_ulen)))));
sbin/dhclient/packet.c
193
if (ntohs(ip->ip_len) != buflen)
sbin/dhclient/packet.c
195
ntohs(ip->ip_len), buflen);
sbin/dhclient/packet.c
206
len = ntohs(udp->uh_ulen) - sizeof(*udp);
sbin/dhclient/packet.c
233
IPPROTO_UDP + (u_int32_t)ntohs(udp->uh_ulen)))));
sbin/dhclient/packet.c
62
sum += (u_int16_t)ntohs(*((u_int16_t *)(buf + i)));
sbin/ifconfig/af_inet6.c
170
ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]);
sbin/ifconfig/af_inet6.c
229
sin->sin6_scope_id = ntohs(index);
sbin/ifconfig/af_inet6.c
262
sin->sin6_scope_id = ntohs(index);
sbin/ip6fw/ip6fw.c
878
rule.fw_divert_port = ntohs(s->s_port);
sbin/ip6fw/ip6fw.c
892
rule.fw_divert_port = ntohs(s->s_port);
sbin/ipfw/ipfw2.c
1181
printf(" tcpwin %d", ntohs(cmd->arg1));
sbin/ipfw/ipfw2.c
1224
printf(",%u", ntohs(c->port));
sbin/ipfw/ipfw2.c
2810
action->arg1 = ntohs(serv->s_port);
sbin/ipfw/ipfw2.c
497
return ntohs(se->s_port);
sbin/iscontrol/login.c
223
uint st_class, status = ntohs(lp->status);
sbin/mountd/mountd.c
647
portno = ntohs(sin->sin_port);
sbin/mountd/mountd.c
651
portno = ntohs(sin6->sin6_port);
sbin/mountd/mountd.c
764
sport = ntohs(((struct sockaddr_in6 *)saddr)->sin6_port);
sbin/mountd/mountd.c
767
sport = ntohs(((struct sockaddr_in *)saddr)->sin_port);
sbin/natd/icmp.c
56
if (ntohs(failedDgram->ip_off) & ~(IP_MF | IP_DF))
sbin/natd/natd.c
1623
SETLOPORT(*portRange, ntohs(sp->s_port));
sbin/natd/natd.c
537
bytes = ntohs(ip->ip_len);
sbin/natd/natd.c
639
ntohs(tcphdr->th_sport),
sbin/natd/natd.c
641
ntohs(tcphdr->th_dport));
sbin/natd/natd.c
648
ntohs(udphdr->uh_sport),
sbin/natd/natd.c
650
ntohs(udphdr->uh_dport));
sbin/ping/ping.c
1369
ntohs(icp->icmp_nextmtu));
sbin/ping/ping.c
1502
ip->ip_v, ip->ip_hl, ip->ip_tos, ntohs(ip->ip_len),
sbin/ping/ping.c
1503
ntohs(ip->ip_id));
sbin/ping/ping.c
1505
(ntohs(ip->ip_off) & 0xe000) >> 13,
sbin/ping/ping.c
1506
ntohs(ip->ip_off) & 0x1fff);
sbin/ping/ping.c
1507
printf(" %02x %02x %04x", ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum));
sbin/ping/ping.c
996
seq = ntohs(icp->icmp_seq);
sbin/ping6/ping6.c
1117
*(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq);
sbin/ping6/ping6.c
1132
*(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq);
sbin/ping6/ping6.c
1144
*(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq);
sbin/ping6/ping6.c
1159
*(u_int16_t *)nip->icmp6_ni_nonce = ntohs(seq);
sbin/ping6/ping6.c
1166
icp->icmp6_seq = ntohs(seq);
sbin/ping6/ping6.c
1207
if (ntohs(icp->icmp6_id) == ident)
sbin/ping6/ping6.c
1345
seq = ntohs(icp->icmp6_seq);
sbin/ping6/ping6.c
1407
seq = ntohs(*(u_int16_t *)ni->icmp6_ni_nonce);
sbin/ping6/ping6.c
1423
switch (ntohs(ni->ni_code)) {
sbin/ping6/ping6.c
1427
printf("refused, type 0x%x", ntohs(ni->ni_type));
sbin/ping6/ping6.c
1430
printf("unknown, type 0x%x", ntohs(ni->ni_type));
sbin/ping6/ping6.c
1434
ntohs(ni->ni_code), ntohs(ni->ni_type));
sbin/ping6/ping6.c
1438
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
1658
ntohs(value2));
sbin/ping6/ping6.c
1790
if (sizeof(cbit) + ntohs(cbit.words) * sizeof(v) >
sbin/ping6/ping6.c
1794
clen = ntohs(cbit.words) * sizeof(v);
sbin/ping6/ping6.c
1795
if (cur + clen * 8 + (u_long)ntohs(cbit.skip) * 32 >
sbin/ping6/ping6.c
1811
cur += ntohs(cbit.skip) * 32;
sbin/ping6/ping6.c
2181
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
2251
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
2301
ntohs(ip6->ip6_plen), ip6->ip6_nxt, ip6->ip6_hlim);
sbin/ping6/ping6.c
784
src.sin6_port = ntohs(DUMMY_PORT);
sbin/route/route.c
404
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
sbin/route/route.c
551
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
sbin/routed/input.c
355
ntohs(n->n_family),
sbin/routed/input.c
450
if (ntohs(from->sin_port) > IPPORT_RESERVED) {
sbin/routed/input.c
478
if (from->sin_port != ntohs(RIP_PORT)) {
sbin/routed/input.c
481
" %d on host %s", ntohs(from->sin_port),
sbin/routed/input.c
945
len = ntohs(NA->au.a_md5.md5_pkt_len);
sbin/routed/input.c
977
if (na2->a_type != ntohs(1))
sbin/routed/input.c
981
na2->a_type, ntohs(1),
sbin/routed/output.c
193
ntohs(in.sin_port),
sbin/routed/rdisc.c
1031
ntohs(p->ad.icmp_ad_life),
sbin/routed/rdisc.c
120
ntohs(p->ad.icmp_ad_life));
sbin/routed/rtquery/rtquery.c
320
myaddr.sin_port = htons(ntohs(myaddr.sin_port)-1);
sbin/routed/rtquery/rtquery.c
691
ntohs(na->au.a_md5.md5_pkt_len),
sbin/routed/rtquery/rtquery.c
700
printf(" Authentication type %d: ", ntohs(na->a_type));
sbin/routed/rtquery/rtquery.c
705
&& na->a_type == ntohs(1)) {
sbin/routed/rtquery/rtquery.c
720
ntohs(n->n_family),
sbin/routed/trace.c
598
fprintf(ftrace, "tag=%#x ", ntohs(rts->rts_tag));
sbin/routed/trace.c
865
ntohs(who->sin_port),
sbin/routed/trace.c
872
naddr_ntoa(who->sin_addr.s_addr), ntohs(who->sin_port),
sbin/routed/trace.c
903
ntohs(n->n_tag));
sbin/routed/trace.c
927
ntohs(NA->au.a_md5.md5_pkt_len),
sbin/routed/trace.c
931
(int)ntohs(NA->au.a_md5.rsvd[0]),
sbin/routed/trace.c
932
(int)ntohs(NA->au.a_md5.rsvd[1]));
sbin/routed/trace.c
937
ntohs(NA->a_type));
sbin/routed/trace.c
951
ntohs(n->n_family),
sbin/routed/trace.c
969
fprintf(ftrace, "tag=%#x", ntohs(n->n_tag));
share/examples/find_interface/find_interface.c
91
local.sin_port = htons(ntohs(local.sin_port) + 1);
share/examples/find_interface/find_interface.c
99
remote.sin_port = htons(ntohs(remote.sin_port) + 1);
stand/boot/pc32/libi386/smbios.c
162
f2 = ntohs(SMBIOS_GET16(addr, 4));
stand/boot/pc32/libi386/smbios.c
163
f3 = ntohs(SMBIOS_GET16(addr, 6));
stand/lib/bootparam.c
183
inet_ntoa(bp_server_addr), ntohs(bp_server_port)));
stand/lib/bootparam.c
189
(int)ntohs(bp_server_port));
stand/lib/ether.c
114
*etype = ntohs(eh->ether_type);
stand/lib/rarp.c
194
printf("bad op=0x%x\n", ntohs(ap->arp_op));
stand/lib/tftp.c
134
if (ntohs(t->th_opcode) == DATA)
stand/lib/tftp.c
145
switch (ntohs(t->th_opcode)) {
stand/lib/tftp.c
173
if ((unsigned) ntohs(t->th_code) >= 8) {
stand/lib/tftp.c
174
printf("illegal tftp error %d\n", ntohs(t->th_code));
stand/lib/tftp.c
178
printf("tftp-error %d\n", ntohs(t->th_code));
stand/lib/tftp.c
180
errno = tftperrors[ntohs(t->th_code)];
stand/lib/tftp.c
185
printf("tftp type %d not handled\n", ntohs(t->th_opcode));
stand/lib/udp.c
191
if (n < ntohs(ip->ip_len)) {
stand/lib/udp.c
195
(int)n, ntohs(ip->ip_len));
stand/lib/udp.c
219
d->myport, ntohs(uh->uh_dport));
stand/lib/udp.c
229
n = ntohs(uh->uh_ulen) + sizeof(*ip);
stand/lib/udp.c
251
if (ntohs(uh->uh_ulen) < sizeof(*uh)) {
stand/lib/udp.c
255
ntohs(uh->uh_ulen), (int)sizeof(*uh));
stand/lib/udp.c
72
inet_ntoa(d->myip), ntohs(d->myport));
stand/lib/udp.c
74
inet_ntoa(d->destip), ntohs(d->destport));
sys/bus/cam/scsi/scsi_cd.c
2211
th->len = ntohs(th->len);
sys/bus/firewire/firewire.c
2056
(caddr_t)ntohl(rfp->mode.wreqb.dest_lo), ntohs(rfp->mode.wreqb.len));
sys/bus/firewire/firewire.c
2069
xfer->send.len = 16 + ntohs(rfp->mode.rreqb.len);
sys/bus/firewire/firewire.c
2072
sfp->mode.rresb.payload, (u_int16_t)ntohs(rfp->mode.rreqb.len));
sys/bus/firewire/firewire.c
2091
xfer->dst = ntohs(rfp->mode.hdr.src);
sys/dev/disk/nata/ata-all.c
974
*ptr = ntohs(*ptr);
sys/dev/disk/nata/atapi-cd.c
1026
cdp->toc.hdr.len = ntohs(cdp->toc.hdr.len);
sys/dev/disk/nata/atapi-cd.c
1583
s->length = ntohs(d->length);
sys/dev/disk/nata/atapi-cd.c
1588
s->length = ntohs(d->length);
sys/dev/disk/nata/atapi-cd.c
1709
cdp->cap.max_read_speed = ntohs(cdp->cap.max_read_speed);
sys/dev/disk/nata/atapi-cd.c
1710
cdp->cap.cur_read_speed = ntohs(cdp->cap.cur_read_speed);
sys/dev/disk/nata/atapi-cd.c
1711
cdp->cap.max_write_speed = ntohs(cdp->cap.max_write_speed);
sys/dev/disk/nata/atapi-cd.c
1712
cdp->cap.cur_write_speed = max(ntohs(cdp->cap.cur_write_speed),177);
sys/dev/disk/nata/atapi-cd.c
1713
cdp->cap.max_vol_levels = ntohs(cdp->cap.max_vol_levels);
sys/dev/disk/nata/atapi-cd.c
1714
cdp->cap.buf_size = ntohs(cdp->cap.buf_size);
sys/dev/disk/nata/atapi-tape.c
517
stp->cap.max_speed = ntohs(stp->cap.max_speed);
sys/dev/disk/nata/atapi-tape.c
518
stp->cap.max_defects = ntohs(stp->cap.max_defects);
sys/dev/disk/nata/atapi-tape.c
519
stp->cap.ctl = ntohs(stp->cap.ctl);
sys/dev/disk/nata/atapi-tape.c
520
stp->cap.speed = ntohs(stp->cap.speed);
sys/dev/disk/nata/atapi-tape.c
521
stp->cap.buffer_size = ntohs(stp->cap.buffer_size);
sys/dev/disk/sbp/sbp.c
1635
ntohs(sbp_status->orb_hi), ntohl(sbp_status->orb_lo));
sys/dev/disk/sbp/sbp.c
1688
login_res->len = ntohs(login_res->len);
sys/dev/disk/sbp/sbp.c
1689
login_res->id = ntohs(login_res->id);
sys/dev/disk/sbp/sbp.c
1690
login_res->cmd_hi = ntohs(login_res->cmd_hi);
sys/dev/disk/sbp/sbp.c
1695
kprintf("login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo, ntohs(login_res->recon_hold));
sys/dev/netif/alc/if_alc.c
3395
m->m_pkthdr.ether_vlantag = ntohs(vtag);
sys/dev/netif/dc/if_dc.c
590
*ptr = ntohs(word);
sys/dev/netif/ix/ixgbe_osdep.h
109
#define IXGBE_NTOHS(_i) ntohs(_i)
sys/dev/netif/lge/if_lge.c
252
*ptr = ntohs(word);
sys/dev/netif/lnc/am7990.c
582
ntohs(eh.ether_type));
sys/dev/netif/lnc/am7990.c
605
ntohs(eh.ether_type));
sys/dev/netif/lnc/am79900.c
619
ntohs(eh.ether_type));
sys/dev/netif/lnc/am79900.c
641
ntohs(eh.ether_type));
sys/dev/netif/msk/if_msk.c
2495
csum = in_cksum_skip(m, ntohs(ip->ip_len) + offset -
sys/dev/netif/msk/if_msk.c
3179
sc_if->msk_vtag = ntohs(len);
sys/dev/netif/msk/if_msk.c
3182
sc_if->msk_vtag = ntohs(len);
sys/dev/netif/mxge/if_mxge.c
1926
(int)ntohs(tx->req_list[i].length),
sys/dev/netif/mxge/if_mxge.c
1927
(int)ntohs(tx->req_list[i].pseudo_hdr_offset),
sys/dev/netif/mxge/if_mxge.c
2169
htonl(ntohs(csum) + ntohs(ip->ip_len) +
sys/dev/netif/mxge/if_mxge.c
2193
*csum = ntohs(*csum);
sys/dev/netif/mxge/if_mxge.c
2208
m->m_pkthdr.ether_vlantag = ntohs(evl->evl_tag);
sys/dev/netif/mxge/if_mxge.c
2345
length = ntohs(rx_done->entry[rx_done->idx].length);
sys/dev/netif/oce/oce_if.c
1048
etype = ntohs(eh->evl_proto);
sys/dev/netif/oce/oce_if.c
1051
etype = ntohs(eh->evl_encap_proto);
sys/dev/netif/re/re.c
31917
*ptr = ntohs(word);
sys/dev/netif/rl/if_rl.c
338
*ptr = ntohs(word);
sys/dev/netif/sis/if_sis.c
346
*ptr = ntohs(word);
sys/dev/netif/sk/if_sk.c
1936
if (hlen > ntohs(ip->ip_len))
sys/dev/netif/sk/if_sk.c
1940
if (plen != ntohs(ip->ip_len))
sys/dev/netif/sk/if_sk.c
1977
htonl(ntohs(ip->ip_len) - hlen + ip->ip_p) + ipd_csum);
sys/dev/netif/ste/if_ste.c
526
*ptr = ntohs(word);
sys/dev/netif/tl/if_tl.c
1184
*p = ntohs(*p);
sys/dev/netif/vge/if_vge.c
1393
ntohs((rxctl & VGE_RDCTL_VLANID));
sys/dev/netif/vge/if_vge.c
292
*ptr = ntohs(word);
sys/dev/netif/xl/if_xl.c
708
*ptr = ntohs(word);
sys/dev/raid/ciss/ciss.c
2939
ccg->cylinders = ntohs(ld->cl_geometry.cylinders);
sys/dev/raid/dpt/dpt.h
341
#define DPT_HCP_LENGTH(page) (ntohs(*(int16_t *)(void *)(&page[2]))+4)
sys/dev/raid/dpt/dpt.h
344
#define DPT_HCP_CODE(param) (ntohs(*(int16_t *)(void *)param))
sys/dev/raid/dpt/dpt_scsi.c
1330
dpt->cppadlen = ntohs(conf.cppadlen);
sys/dev/raid/dpt/dpt_scsi.c
1331
dpt->max_dccbs = ntohs(conf.queuesiz);
sys/dev/raid/dpt/dpt_scsi.c
1346
dpt->sgsize = ntohs(conf.SGsiz);
sys/dev/virtual/amazon/ena/ena.c
2674
etype = ntohs(eh->evl_proto);
sys/dev/virtual/amazon/ena/ena.c
2677
etype = ntohs(eh->evl_encap_proto);
sys/dev/virtual/virtio/net/if_vtnet.c
1565
m->m_pkthdr.ether_vlantag = ntohs(evl->evl_tag);
sys/dev/virtual/virtio/net/if_vtnet.c
1599
eth_type = ntohs(eh->ether_type);
sys/dev/virtual/virtio/net/if_vtnet.c
1602
eth_type = ntohs(evh->evl_proto);
sys/dev/virtual/virtio/net/if_vtnet.c
1898
eth_type = ntohs(eh->ether_type);
sys/dev/virtual/virtio/net/if_vtnet.c
1906
eth_type = ntohs(evh->evl_proto);
sys/dev/virtual/vmware/vmxnet3/if_vmx.c
2749
*etype = ntohs(evh->evl_proto);
sys/dev/virtual/vmware/vmxnet3/if_vmx.c
2752
*etype = ntohs(evh->evl_encap_proto);
sys/net/altq/altq_red.c
473
sum = ~ntohs(ip->ip_sum) & 0xffff;
sys/net/altq/altq_subr.c
798
sum = ~ntohs(ip->ip_sum) & 0xffff;
sys/net/bpf_filter.c
47
#define EXTRACT_SHORT(p) ((u_int16_t)ntohs(*(u_int16_t *)p))
sys/net/bridge/bridgestp.c
874
len = ntohs(eh->ether_type);
sys/net/bridge/bridgestp.c
907
(((uint64_t)ntohs(cpdu.cbu_rootpri)) << 48) |
sys/net/bridge/bridgestp.c
916
(((uint64_t)ntohs(cpdu.cbu_bridgepri)) << 48) |
sys/net/bridge/bridgestp.c
925
cu.cu_message_age = ntohs(cpdu.cbu_messageage);
sys/net/bridge/bridgestp.c
926
cu.cu_max_age = ntohs(cpdu.cbu_maxage);
sys/net/bridge/bridgestp.c
927
cu.cu_hello_time = ntohs(cpdu.cbu_hellotime);
sys/net/bridge/bridgestp.c
928
cu.cu_forward_delay = ntohs(cpdu.cbu_forwarddelay);
sys/net/bridge/bridgestp.c
929
cu.cu_port_id = ntohs(cpdu.cbu_portid);
sys/net/bridge/if_bridge.c
2700
(ntohs(eh->ether_type) == ETHERTYPE_ARP ||
sys/net/bridge/if_bridge.c
2701
ntohs(eh->ether_type) == ETHERTYPE_REVARP)) {
sys/net/bridge/if_bridge.c
3996
ether_type = ntohs(eh1->ether_type);
sys/net/bridge/if_bridge.c
4276
len = ntohs(ip->ip_len);
sys/net/gre/if_gre.c
368
ip->ip_len = htons(ntohs(ip->ip_len) + msiz);
sys/net/if_ethersubr.c
1072
ether_type = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
1340
uint16_t ether_type = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
1353
ether_type = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
1596
ether_type = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
269
switch(ntohs(ah->ar_op)) {
sys/net/if_ethersubr.c
901
ether_type = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
913
ether_type = ntohs(llc->llc_un.type_snap.ether_type);
sys/net/ip6fw/ip6_fw.c
255
len = ntohs(ip6->ip6_plen) + sizeof(struct ip6_hdr);
sys/net/ip6fw/ip6_fw.c
420
ntohs(tcp6->th_sport));
sys/net/ip6fw/ip6_fw.c
427
ntohs(tcp6->th_dport));
sys/net/ip6fw/ip6_fw.c
434
ntohs(udp->uh_sport));
sys/net/ip6fw/ip6_fw.c
441
ntohs(udp->uh_dport));
sys/net/ip6fw/ip6_fw.c
511
u_int16_t ignport = ntohs(*cookie);
sys/net/ip6fw/ip6_fw.c
635
src_port = ntohs(tcp6->th_sport);
sys/net/ip6fw/ip6_fw.c
636
dst_port = ntohs(tcp6->th_dport);
sys/net/ip6fw/ip6_fw.c
657
src_port = ntohs(udp->uh_sport);
sys/net/ip6fw/ip6_fw.c
658
dst_port = ntohs(udp->uh_dport);
sys/net/ip6fw/ip6_fw.c
705
f->fw_bcnt += ntohs(ip6->ip6_plen);
sys/net/ip6fw/ip6_fw.c
802
ack += ntohs(ip6->ip6_plen) + sizeof(*ip6)
sys/net/ip_mroute/ip_mroute.c
1449
int plen = ntohs(ip->ip_len);
sys/net/ip_mroute/ip_mroute.c
1637
mtod(mb_copy, struct ip *), ntohs(ip->ip_len));
sys/net/ip_mroute/ip_mroute.c
1645
int i, len = ntohs(ip->ip_len);
sys/net/ip_mroute/ip_mroute.c
1682
ip_copy->ip_len = htons(ntohs(ip_copy->ip_len) + len);
sys/net/ip_mroute/ip_mroute.c
1699
tbf_control(vifp, mb_copy, ip, ntohs(ip_copy->ip_len));
sys/net/ip_mroute/ip_mroute.c
1855
int len = ntohs(mtod(m, struct ip *)->ip_len);
sys/net/ip_mroute/ip_mroute.c
2010
switch (ntohs(udp->uh_dport) & 0xc000) {
sys/net/ip_mroute/ip_mroute.c
2873
if (ntohs(ip->ip_len) <= mtu) {
sys/net/ip_mroute/ip_mroute.c
2895
int len = ntohs(ip->ip_len);
sys/net/ip_mroute/ip_mroute.c
2949
int len = ntohs(ip->ip_len);
sys/net/ip_mroute/ip_mroute.c
3003
tbf_control(vifp, mb_first, ip, ntohs(ip_outer->ip_len));
sys/net/ip_mroute/ip_mroute.c
3027
int datalen = ntohs(ip->ip_len);
sys/net/ip_mroute/ip_mroute.c
3146
ntohs(encap_ip->ip_len));
sys/net/ip_mroute/ip_mroute.c
3215
pimstat.pims_rcv_registers_bytes += ntohs(encap_ip->ip_len);
sys/net/ipfw/ip_fw2.c
1498
ip_off = ntohs(ip->ip_off);
sys/net/ipfw/ip_fw2.c
1499
ip_len = ntohs(ip->ip_len);
sys/net/ipfw/ip_fw2.c
1508
ntohs(tcp->th_sport),
sys/net/ipfw/ip_fw2.c
1510
ntohs(tcp->th_dport));
sys/net/ipfw/ip_fw2.c
1522
ntohs(udp->uh_sport),
sys/net/ipfw/ip_fw2.c
1524
ntohs(udp->uh_dport));
sys/net/ipfw/ip_fw2.c
1556
ntohs(ip->ip_id), ip_len - (ip->ip_hl << 2),
sys/net/ipfw/ip_fw2.c
3161
dlen = ntohs(ip->ip_len) - (ip->ip_hl << 2);
sys/net/ipfw/ip_fw2.c
3305
local->offset = ntohs(ip->ip_off) & IP_OFFMASK;
sys/net/ipfw/ip_fw2.c
3306
local->ip_len = ntohs(ip->ip_len);
sys/net/ipfw/ip_fw2.c
3351
args->f_id.src_port = local->src_port = ntohs(local->src_port);
sys/net/ipfw/ip_fw2.c
3352
args->f_id.dst_port = local->dst_port = ntohs(local->dst_port);
sys/net/ipfw/ip_fw2.c
3471
ntohs(args->eh->ether_type) == ETHERTYPE_IP))
sys/net/ipfw/ip_fw2.c
3704
ntohs(args->eh->ether_type);
sys/net/ipfw/ip_fw2.c
3729
off = ntohs(ip->ip_off);
sys/net/ipfw/ip_fw2.c
3885
cmd->arg1 == ntohs(ip->ip_id));
sys/net/ipfw/ip_fw2.c
4251
ip->ip_len = htons(ntohs(ip->ip_len) + hlen);
sys/net/ipfw/ip_fw2.c
5696
ioc_state->xlat_port = ntohs(x->xlat_port);
sys/net/ipfw3/ip_fw3.c
357
ntohs(args->eh->ether_type) == ETHERTYPE_IP))
sys/net/ipfw3/ip_fw3.c
371
offset = ntohs(ip->ip_off) & IP_OFFMASK;
sys/net/ipfw3/ip_fw3.c
372
ip_len = ntohs(ip->ip_len);
sys/net/ipfw3/ip_fw3.c
415
args->f_id.src_port = src_port = ntohs(src_port);
sys/net/ipfw3/ip_fw3.c
416
args->f_id.dst_port = dst_port = ntohs(dst_port);
sys/net/ipfw3_basic/ip_fw3_basic.c
288
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
335
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
359
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
381
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
428
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
452
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
540
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_basic.c
562
ntohs((*args)->eh->ether_type) == ETHERTYPE_IP)) {
sys/net/ipfw3_basic/ip_fw3_state.c
446
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
447
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_basic/ip_fw3_state.c
461
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
462
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_basic/ip_fw3_state.c
476
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
477
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_basic/ip_fw3_state.c
491
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
492
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_basic/ip_fw3_state.c
506
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
507
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_basic/ip_fw3_state.c
521
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_basic/ip_fw3_state.c
522
ioc->dst_port = ntohs(s->dst_port);
sys/net/ipfw3_nat/ip_fw3_nat.c
351
dlen = ntohs(ip->ip_len) - (ip->ip_hl << 2);
sys/net/ipfw3_nat/ip_fw3_nat.c
599
ioc->src_port = ntohs(s->src_port);
sys/net/ipfw3_nat/ip_fw3_nat.c
600
ioc->dst_port = ntohs(s->dst_port);
sys/net/lagg/ieee8023ad_lacp.c
1930
ntohs(mdu->mdu_info.mi_rq_port), *mdu->mdu_info.mi_rq_system,
sys/net/lagg/ieee8023ad_lacp.c
2017
ntohs(sysid->lsi_prio),
sys/net/lagg/ieee8023ad_lacp.c
2027
ntohs(portid->lpi_prio),
sys/net/lagg/ieee8023ad_lacp.c
2028
ntohs(portid->lpi_portno));
sys/net/lagg/ieee8023ad_lacp.c
2041
ntohs(peer->lip_key),
sys/net/lagg/ieee8023ad_lacp.c
2109
kprintf("maxdelay=%d\n", ntohs(du->ldu_collector.lci_maxdelay));
sys/net/lagg/ieee8023ad_lacp.c
439
ntohs(mdu->mdu_info.mi_rq_port), *mdu->mdu_info.mi_rq_system,
sys/net/lagg/ieee8023ad_lacp.c
612
req->actor_prio = ntohs(la->la_actor.lip_systemid.lsi_prio);
sys/net/lagg/ieee8023ad_lacp.c
615
req->actor_key = ntohs(la->la_actor.lip_key);
sys/net/lagg/ieee8023ad_lacp.c
616
req->actor_portprio = ntohs(la->la_actor.lip_portid.lpi_prio);
sys/net/lagg/ieee8023ad_lacp.c
617
req->actor_portno = ntohs(la->la_actor.lip_portid.lpi_portno);
sys/net/lagg/ieee8023ad_lacp.c
620
req->partner_prio = ntohs(la->la_partner.lip_systemid.lsi_prio);
sys/net/lagg/ieee8023ad_lacp.c
623
req->partner_key = ntohs(la->la_partner.lip_key);
sys/net/lagg/ieee8023ad_lacp.c
624
req->partner_portprio = ntohs(la->la_partner.lip_portid.lpi_prio);
sys/net/lagg/ieee8023ad_lacp.c
625
req->partner_portno = ntohs(la->la_partner.lip_portid.lpi_portno);
sys/net/lagg/ieee8023ad_lacp.c
639
req->actor_prio = ntohs(lp->lp_actor.lip_systemid.lsi_prio);
sys/net/lagg/ieee8023ad_lacp.c
642
req->actor_key = ntohs(lp->lp_actor.lip_key);
sys/net/lagg/ieee8023ad_lacp.c
643
req->actor_portprio = ntohs(lp->lp_actor.lip_portid.lpi_prio);
sys/net/lagg/ieee8023ad_lacp.c
644
req->actor_portno = ntohs(lp->lp_actor.lip_portid.lpi_portno);
sys/net/lagg/ieee8023ad_lacp.c
647
req->partner_prio = ntohs(lp->lp_partner.lip_systemid.lsi_prio);
sys/net/lagg/ieee8023ad_lacp.c
650
req->partner_key = ntohs(lp->lp_partner.lip_key);
sys/net/lagg/ieee8023ad_lacp.c
651
req->partner_portprio = ntohs(lp->lp_partner.lip_portid.lpi_prio);
sys/net/lagg/ieee8023ad_lacp.c
652
req->partner_portno = ntohs(lp->lp_partner.lip_portid.lpi_portno);
sys/net/lagg/if_lagg.c
1675
etype = ntohs(eh->ether_type);
sys/net/lagg/if_lagg.c
1695
etype = ntohs(vlan->evl_proto);
sys/net/lagg/if_lagg.c
2141
etype = ntohs(eh->ether_type);
sys/net/pf/pf.c
1649
p = ntohs(p);
sys/net/pf/pf.c
1686
b = ntohs(addr->addr16[i]);
sys/net/pf/pf.c
1693
p = ntohs(p);
sys/net/pf/pf.c
2454
a1 = ntohs(a1);
sys/net/pf/pf.c
2455
a2 = ntohs(a2);
sys/net/pf/pf.c
2456
p = ntohs(p);
sys/net/pf/pf.c
3306
tmp_nport = ((ntohs(dport) -
sys/net/pf/pf.c
3307
ntohs(r->dst.port[0])) %
sys/net/pf/pf.c
4033
len = ntohs(h4->ip_len) - off;
sys/net/pf/pf.c
4174
s->src.max_win = MAX(ntohs(th->th_win), 1);
sys/net/pf/pf.c
4426
u_int16_t win = ntohs(th->th_win);
sys/net/pf/pf.c
4877
ntohs(key.port[0]),
sys/net/pf/pf.c
4879
ntohs(key.port[1]));
sys/net/pf/pf.c
4889
ntohs(key.port[0]),
sys/net/pf/pf.c
4891
ntohs(key.port[1]));
sys/net/pf/pf.c
4945
(*state)->src.max_win = MAX(ntohs(th->th_win), 1);
sys/net/pf/pf.c
4961
(*state)->dst.max_win = MAX(ntohs(th->th_win), 1);
sys/net/pf/pf.c
5876
u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
sys/net/pf/pf.c
5888
ntohs(h->ip_len) < off + len) {
sys/net/pf/pf.c
5901
(ntohs(h->ip6_plen) + sizeof(struct ip6_hdr)) <
sys/net/pf/pf.c
6160
if (ntohs(ip->ip_len) <= ifp->if_mtu ||
sys/net/pf/pf.c
6602
pd.tot_len = ntohs(h->ip_len);
sys/net/pf/pf.c
6655
ntohs(uh.uh_ulen) > m->m_pkthdr.len - off ||
sys/net/pf/pf.c
6656
ntohs(uh.uh_ulen) < sizeof(struct udphdr)) {
sys/net/pf/pf.c
6938
pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr);
sys/net/pf/pf.c
7052
ntohs(uh.uh_ulen) > m->m_pkthdr.len - off ||
sys/net/pf/pf.c
7053
ntohs(uh.uh_ulen) < sizeof(struct udphdr)) {
sys/net/pf/pf.c
821
ntohl(sk->addr[0].addr32[0]), ntohs(sk->port[0]),
sys/net/pf/pf.c
823
ntohl(sk->addr[1].addr32[0]), ntohs(sk->port[1]));
sys/net/pf/pf_norm.c
1241
if (ntohs(h->ip6_plen) == 0)
sys/net/pf/pf_norm.c
1244
plen = ntohs(h->ip6_plen);
sys/net/pf/pf_norm.c
1257
if (ntohs(h->ip6_plen) == 0 || jumbolen)
sys/net/pf/pf_norm.c
1259
plen = ntohs(h->ip6_plen);
sys/net/pf/pf_norm.c
1263
fragoff = ntohs(frag.ip6f_offlg & IP6F_OFF_MASK);
sys/net/pf/pf_norm.c
1941
if ((ntohs(*mss)) > r->max_mss) {
sys/net/pf/pf_norm.c
330
#define FR_IP_OFF(fr) ((ntohs((fr)->fr_ip->ip_off) & IP_OFFMASK) << 3)
sys/net/pf/pf_norm.c
341
u_int16_t off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/net/pf/pf_norm.c
342
u_int16_t ip_len = ntohs(ip->ip_len) - hlen;
sys/net/pf/pf_norm.c
400
(FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) -
sys/net/pf/pf_norm.c
405
precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) -
sys/net/pf/pf_norm.c
412
ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
sys/net/pf/pf_norm.c
413
off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/net/pf/pf_norm.c
428
if (aftercut < (ntohs(frea->fr_ip->ip_len) -
sys/net/pf/pf_norm.c
432
htons(ntohs(frea->fr_ip->ip_len) - aftercut +
sys/net/pf/pf_norm.c
435
htons(ntohs(frea->fr_ip->ip_off) + (aftercut >> 3));
sys/net/pf/pf_norm.c
470
off += ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * 4;
sys/net/pf/pf_norm.c
535
kprintf("reassembly complete: len=%u\n", ntohs(ip->ip_len));
sys/net/pf/pf_norm.c
538
ntohs(ip->ip_off), ntohs(ip->ip_len));
sys/net/pf/pf_norm.c
541
DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip->ip_len)));
sys/net/pf/pf_norm.c
558
int ip_len = ntohs(h->ip_len) - (h->ip_hl << 2);
sys/net/pf/pf_norm.c
559
u_int16_t off = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
sys/net/pf/pf_norm.c
685
ntohs(h->ip_len) - precut),
sys/net/pf/pf_norm.c
688
h->ip_off = htons(ntohs(h->ip_off) +
sys/net/pf/pf_norm.c
690
h->ip_len = htons(ntohs(h->ip_len) - precut);
sys/net/pf/pf_norm.c
744
ntohs(h->ip_len) - aftercut),
sys/net/pf/pf_norm.c
747
h->ip_len = htons(ntohs(h->ip_len) - aftercut);
sys/net/pf/pf_norm.c
871
u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
sys/net/pf/pf_norm.c
913
if (hlen > ntohs(h->ip_len))
sys/net/pf/pf_norm.c
940
ip_len = ntohs(h->ip_len) - hlen;
sys/net/pf/pf_osfp.c
139
fp.fp_psize = ntohs(ip->ip_len);
sys/net/pf/pf_osfp.c
162
fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
sys/net/pf/pf_osfp.c
181
fp.fp_wsize = ntohs(tcp->th_win);
sys/net/pf/pf_osfp.c
208
fp.fp_mss = ntohs(fp.fp_mss);
sys/net/pf/pf_osfp.c
242
srcname, ntohs(tcp->th_sport),
sys/net/pf/pfvar.h
227
#define NTOHS(x) (x) = ntohs((__uint16_t)(x))
sys/net/pf/pfvar.h
958
(d)->max_win = ntohs((s)->max_win); \
sys/net/pf/pfvar.h
959
(d)->mss = ntohs((s)->mss); \
sys/net/pf/pfvar.h
965
ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \
sys/net/ppp_layer/slcompress.c
126
(f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
sys/net/ppp_layer/slcompress.c
129
(f) = htons(ntohs(f) + (u_int32_t)*cp++); \
sys/net/ppp_layer/slcompress.c
278
deltaS = ntohs(th->th_urp);
sys/net/ppp_layer/slcompress.c
288
deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win));
sys/net/ppp_layer/slcompress.c
322
ntohs(cs->cs_ip.ip_len) == hlen)
sys/net/ppp_layer/slcompress.c
339
deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
sys/net/ppp_layer/slcompress.c
347
if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
sys/net/ppp_layer/slcompress.c
355
deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
sys/net/ppp_layer/slcompress.c
366
deltaA = ntohs(th->th_sum);
sys/net/ppp_layer/slcompress.c
534
u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
sys/net/ppp_layer/slcompress.c
542
ntohs(cs->cs_ip.ip_len) -
sys/net/ppp_layer/slcompress.c
563
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
sys/net/route.c
1497
ntohs(sa4->sin_port),
sys/net/route.c
1507
ntohs(sa6->sin6_port),
sys/net/route.c
1508
ntohs(sa6->sin6_addr.s6_addr16[0]),
sys/net/route.c
1509
ntohs(sa6->sin6_addr.s6_addr16[1]),
sys/net/route.c
1510
ntohs(sa6->sin6_addr.s6_addr16[2]),
sys/net/route.c
1511
ntohs(sa6->sin6_addr.s6_addr16[3]),
sys/net/route.c
1512
ntohs(sa6->sin6_addr.s6_addr16[4]),
sys/net/route.c
1513
ntohs(sa6->sin6_addr.s6_addr16[5]),
sys/net/route.c
1514
ntohs(sa6->sin6_addr.s6_addr16[6]),
sys/net/route.c
1515
ntohs(sa6->sin6_addr.s6_addr16[7])
sys/net/sppp/if_spppsubr.c
1363
ntohs (lh->len));
sys/net/sppp/if_spppsubr.c
1400
printlen = ntohs(h->len);
sys/net/sppp/if_spppsubr.c
1412
if (len > ntohs (h->len))
sys/net/sppp/if_spppsubr.c
1413
len = ntohs (h->len);
sys/net/sppp/if_spppsubr.c
1651
sppp_cp_type_name(h->type), ntohs(*((u_short *)p)));
sys/net/sppp/if_spppsubr.c
1681
proto = ntohs(*((u_int16_t *)p));
sys/net/sppp/if_spppsubr.c
3909
if (len > ntohs (h->len))
sys/net/sppp/if_spppsubr.c
3910
len = ntohs (h->len);
sys/net/sppp/if_spppsubr.c
3926
h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
3938
ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4019
h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4050
h->ident, ntohs (h->len));
sys/net/sppp/if_spppsubr.c
4104
h->type, h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4321
if (len > ntohs (h->len))
sys/net/sppp/if_spppsubr.c
4322
len = ntohs (h->len);
sys/net/sppp/if_spppsubr.c
4336
h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4348
h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4443
h->type, h->ident, ntohs(h->len));
sys/net/sppp/if_spppsubr.c
4674
lh->ident, ntohs(lh->len));
sys/net/sppp/if_spppsubr.c
495
h->address, h->control, ntohs(h->protocol));
sys/net/sppp/if_spppsubr.c
498
switch (ntohs (h->protocol)) {
sys/net/sppp/if_spppsubr.c
505
h->address, h->control, ntohs(h->protocol));
sys/net/sppp/if_spppsubr.c
612
h->address, h->control, ntohs(h->protocol));
sys/net/sppp/if_spppsubr.c
615
switch (ntohs (h->protocol)) {
sys/net/sppp/if_spppsubr.c
644
h->address, h->control, ntohs(h->protocol));
sys/net/sppp/if_spppsubr.c
760
else if (INTERACTIVE (ntohs (tcp->th_sport)))
sys/net/sppp/if_spppsubr.c
762
else if (INTERACTIVE (ntohs (tcp->th_dport)))
sys/net/stf/if_stf.c
120
#define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002)
sys/net/vlan/if_vlan_ether.c
152
m->m_pkthdr.ether_vlantag = ntohs(evh->evl_tag);
sys/net/wg/if_wg.c
1036
*port = ntohs(satosin(bound_sa)->sin_port);
sys/net/wg/if_wg.c
1038
*port = ntohs(satosin6(bound_sa)->sin6_port);
sys/net/wg/if_wg.c
1909
len = ntohs(ip->ip_len);
sys/net/wg/if_wg.c
1915
len = ntohs(ip6->ip6_plen) + sizeof(struct ip6_hdr);
sys/netgraph/cisco/ng_cisco.c
472
switch (ntohs(h->protocol)) {
sys/netgraph/ksocket/ng_ksocket.c
353
(u_int)ntohs(sin->sin_port));
sys/netgraph/l2tp/ng_l2tp.c
463
conf->tunnel_id = ntohs(conf->tunnel_id);
sys/netgraph/l2tp/ng_l2tp.c
464
conf->peer_id = ntohs(conf->peer_id);
sys/netgraph/l2tp/ng_l2tp.c
537
conf->session_id = ntohs(conf->session_id);
sys/netgraph/l2tp/ng_l2tp.c
538
conf->peer_id = ntohs(conf->peer_id);
sys/netgraph/l2tp/ng_l2tp.c
712
hdr = ntohs(*mtod(m, u_int16_t *));
sys/netgraph/l2tp/ng_l2tp.c
739
len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4;
sys/netgraph/l2tp/ng_l2tp.c
791
ns = ntohs(ns);
sys/netgraph/l2tp/ng_l2tp.c
793
nr = ntohs(nr);
sys/netgraph/l2tp/ng_l2tp.c
811
offset = ntohs(offset);
sys/netgraph/mppc/ng_mppc.c
591
header = ntohs(header);
sys/netgraph/ppp/ng_ppp.c
1086
shdr = ntohs(*mtod(m, u_int16_t *));
sys/netgraph/ppp/ng_ppp.c
696
linkNum = ntohs(mtod(m, u_int16_t *)[0]);
sys/netgraph/ppp/ng_ppp.c
697
proto = ntohs(mtod(m, u_int16_t *)[1]);
sys/netgraph/pppoe/ng_pppoe.c
1004
|| (ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph/pppoe/ng_pppoe.c
1061
|| (ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph/pppoe/ng_pppoe.c
1143
|| (ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph/pppoe/ng_pppoe.c
1163
sp->Session_ID = ntohs(wh->ph.sid);
sys/netgraph/pppoe/ng_pppoe.c
1312
length = ntohs(wh->ph.length);
sys/netgraph/pppoe/ng_pppoe.c
1635
ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
sys/netgraph/pppoe/ng_pppoe.c
275
+ ntohs(ph->length));
sys/netgraph/pppoe/ng_pppoe.c
297
ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
sys/netgraph/pppoe/ng_pppoe.c
370
tlen = ntohs((*tag)->tag_len) + sizeof(**tag);
sys/netgraph/pppoe/ng_pppoe.c
452
u_int16_t session = ntohs(wh->ph.sid);
sys/netgraph/pppoe/ng_pppoe.c
850
tlen = min(NG_HOOKSIZ - 1, ntohs(tag->tag_len));
sys/netgraph/pppoe/ng_pppoe.c
925
length = ntohs(wh->ph.length);
sys/netgraph/pppoe/ng_pppoe.c
986
tag->tag_data, ntohs(tag->tag_len),
sys/netgraph/pptpgre/ng_pptpgre.c
622
- (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length));
sys/netgraph/pptpgre/ng_pptpgre.c
632
if (ntohs(gre->cid) != priv->conf.cid) {
sys/netgraph/rfc1490/ng_rfc1490.c
246
etype = ntohs(*((const u_int16_t *)ptr));
sys/netgraph7/cisco/ng_cisco.c
465
switch (ntohs(h->protocol)) {
sys/netgraph7/deflate/ng_deflate.c
556
proto = ntohs(((uint16_t *)priv->inbuf)[0]);
sys/netgraph7/deflate/ng_deflate.c
567
rseqnum = ntohs(((uint16_t *)(priv->inbuf + offset))[0]);
sys/netgraph7/ksocket/ng_ksocket.c
354
(u_int)ntohs(sin->sin_port));
sys/netgraph7/l2tp/ng_l2tp.c
508
conf->tunnel_id = ntohs(conf->tunnel_id);
sys/netgraph7/l2tp/ng_l2tp.c
509
conf->peer_id = ntohs(conf->peer_id);
sys/netgraph7/l2tp/ng_l2tp.c
570
conf->session_id = ntohs(conf->session_id);
sys/netgraph7/l2tp/ng_l2tp.c
571
conf->peer_id = ntohs(conf->peer_id);
sys/netgraph7/l2tp/ng_l2tp.c
811
hdr = ntohs(*mtod(m, u_int16_t *));
sys/netgraph7/l2tp/ng_l2tp.c
840
len = (u_int16_t)ntohs(*mtod(m, u_int16_t *)) - 4;
sys/netgraph7/l2tp/ng_l2tp.c
890
ns = ntohs(ns);
sys/netgraph7/l2tp/ng_l2tp.c
892
nr = ntohs(nr);
sys/netgraph7/l2tp/ng_l2tp.c
910
offset = ntohs(offset);
sys/netgraph7/mppc/ng_mppc.c
611
header = ntohs(header);
sys/netgraph7/netflow/netflow.c
412
plen = ntohs(ip->ip_len);
sys/netgraph7/netflow/ng_netflow.c
510
etype = ntohs(eh->ether_type);
sys/netgraph7/netflow/ng_netflow.c
524
if (ntohs(evh->evl_proto) == ETHERTYPE_IP) {
sys/netgraph7/netflow/ng_netflow.c
567
switch (ntohs(eh->ether_type)) {
sys/netgraph7/ng_nat.c
703
KASSERT(m->m_pkthdr.len == ntohs(ip->ip_len),
sys/netgraph7/ng_nat.c
722
m->m_pkthdr.len = m->m_len = ntohs(ip->ip_len);
sys/netgraph7/ng_nat.c
755
ntohs(ip->ip_len) - (ip->ip_hl << 2)));
sys/netgraph7/ng_vlan.c
380
vlan = EVL_VLANOFTAG(ntohs(evl->evl_tag));
sys/netgraph7/ppp/ng_ppp.c
1537
shdr = ntohs(*mtod(m, uint16_t *));
sys/netgraph7/ppp/ng_ppp.c
867
linkNum = ntohs(mtod(m, uint16_t *)[0]);
sys/netgraph7/ppp/ng_ppp.c
868
proto = ntohs(mtod(m, uint16_t *)[1]);
sys/netgraph7/pppoe/ng_pppoe.c
1101
tlen = min(NG_HOOKSIZ - 1, ntohs(tag->tag_len));
sys/netgraph7/pppoe/ng_pppoe.c
1201
session = ntohs(wh->ph.sid);
sys/netgraph7/pppoe/ng_pppoe.c
1202
length = ntohs(wh->ph.length);
sys/netgraph7/pppoe/ng_pppoe.c
1314
length = ntohs(wh->ph.length);
sys/netgraph7/pppoe/ng_pppoe.c
1359
length = ntohs(wh->ph.length);
sys/netgraph7/pppoe/ng_pppoe.c
1361
session = ntohs(wh->ph.sid);
sys/netgraph7/pppoe/ng_pppoe.c
1390
ntohs(tag->tag_len) == 0)
sys/netgraph7/pppoe/ng_pppoe.c
1404
(ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph7/pppoe/ng_pppoe.c
1486
(ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph7/pppoe/ng_pppoe.c
1567
(ntohs(utag->tag_len) != sizeof(sp))) {
sys/netgraph7/pppoe/ng_pppoe.c
1584
sp->Session_ID = ntohs(wh->ph.sid);
sys/netgraph7/pppoe/ng_pppoe.c
1872
ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
sys/netgraph7/pppoe/ng_pppoe.c
293
+ ntohs(ph->length));
sys/netgraph7/pppoe/ng_pppoe.c
315
ptn = (((const char *)(pt + 1)) + ntohs(pt->tag_len));
sys/netgraph7/pppoe/ng_pppoe.c
387
tlen = ntohs((*tag)->tag_len) + sizeof(**tag);
sys/netgraph7/pppoe/ng_pppoe.c
433
if (neg->service_len != ntohs(tag->tag_len))
sys/netgraph7/pppoe/ng_pppoe.c
437
ntohs(tag->tag_len)) == 0)
sys/netgraph7/pppoe/ng_pppoe.c
560
uint16_t session = ntohs(wh->ph.sid);
sys/netgraph7/pptpgre/ng_pptpgre.c
708
- (iphlen + grelen + gre->hasSeq * (u_int16_t)ntohs(gre->length));
sys/netgraph7/pptpgre/ng_pptpgre.c
719
hpriv = ng_pptpgre_find_session(priv, ntohs(gre->cid));
sys/netgraph7/rfc1490/ng_rfc1490.c
343
switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
sys/netgraph7/tcpmss/ng_tcpmss.c
433
if (ntohs(*mss) > maxmss) {
sys/netinet/if_ether.c
1174
if (ntohs(ah->ar_op) != ARPOP_REQUEST) {
sys/netinet/if_ether.c
641
ar_hrd = ntohs(ar->ar_hrd);
sys/netinet/if_ether.c
658
switch (ntohs(ar->ar_pro)) {
sys/netinet/igmp.c
196
igmplen = ntohs(ip->ip_len) - iphlen;
sys/netinet/in_pcb.c
2141
"limit reached\n", ntohs(grp->il_lport));
sys/netinet/in_pcb.c
468
u_short lport_ho = ntohs(lport);
sys/netinet/in_pcb.c
675
if (ntohs(lport) < IPPORT_RESERVED && cred &&
sys/netinet/in_pcb.h
316
(((faddr) ^ ((faddr) >> 16) ^ (laddr) ^ ntohs((lport) ^ (fport))) & (mask))
sys/netinet/in_pcb.h
318
#define INP_PCBPORTHASH(lport, cnt) (ntohs(lport) % (cnt))
sys/netinet/in_pcb.h
320
#define INP_PCBWILDCARDHASH(lport, mask) (ntohs(lport) & (mask))
sys/netinet/in_pcb.h
322
#define INP_PCBLOCALGRPHASH(lport, mask) (ntohs(lport) & (mask))
sys/netinet/ip_demux.c
190
iplen = ntohs(ip->ip_len);
sys/netinet/ip_demux.c
234
thoff + iphlen > ntohs(ip->ip_len)) {
sys/netinet/ip_divert.c
354
if ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len) {
sys/netinet/ip_divert.c
579
frag_off = ntohs(ip->ip_off) << 3;
sys/netinet/ip_divert.c
607
ip->ip_len = htons(ntohs(ip->ip_len) + hlen);
sys/netinet/ip_flow.c
201
iplen = ntohs(ip->ip_len);
sys/netinet/ip_gre.c
151
flags = ntohs(gip->gi_flags);
sys/netinet/ip_gre.c
164
switch (ntohs(gip->gi_ptype)) { /* ethertypes */
sys/netinet/ip_gre.c
223
if(ntohs(mip->mh.proto) & MOB_H_SBIT) {
sys/netinet/ip_gre.c
230
mip->mi.ip_p = (ntohs(mip->mh.proto) >> 8);
sys/netinet/ip_gre.c
247
ip->ip_len = htons(ntohs(ip->ip_len) + sizeof(struct ip) - msiz);
sys/netinet/ip_icmp.c
1090
ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
sys/netinet/ip_icmp.c
1125
icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);
sys/netinet/ip_icmp.c
184
icmplen = min(oiplen + 8, ntohs(oip->ip_len));
sys/netinet/ip_icmp.c
290
mtu = ntohs(icp->icmp_nextmtu);
sys/netinet/ip_icmp.c
597
icmplen = ntohs(ip->ip_len) - hlen;
sys/netinet/ip_input.c
1058
ip_len = ntohs(ip->ip_len) - hlen;
sys/netinet/ip_input.c
1119
if ((ntohs(GETIP(q)->ip_off) & IP_OFFMASK) >
sys/netinet/ip_input.c
1120
(ntohs(ip->ip_off) & IP_OFFMASK))
sys/netinet/ip_input.c
1130
ip_off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/netinet/ip_input.c
1131
ip_len = ntohs(ip->ip_len);
sys/netinet/ip_input.c
1156
fp_off = (ntohs(GETIP(p)->ip_off) & IP_OFFMASK) << 3;
sys/netinet/ip_input.c
1157
fp_len = ntohs(GETIP(p)->ip_len) -
sys/netinet/ip_input.c
1193
fp_off = (ntohs(GETIP(q)->ip_off) & IP_OFFMASK) << 3;
sys/netinet/ip_input.c
1195
fp_len = ntohs(GETIP(q)->ip_len) - fp_hlen;
sys/netinet/ip_input.c
1238
fp_off = (ntohs(GETIP(q)->ip_off) & IP_OFFMASK) << 3;
sys/netinet/ip_input.c
1240
fp_len = ntohs(GETIP(q)->ip_len) - fp_hlen;
sys/netinet/ip_input.c
1958
ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
sys/netinet/ip_input.c
2064
(int)ntohs(ip->ip_len));
sys/netinet/ip_input.c
572
ip_len = ntohs(ip->ip_len);
sys/netinet/ip_output.c
1001
ip->ip_len = htons(ntohs( ip->ip_len) + optlen);
sys/netinet/ip_output.c
489
if (ntohs(ip->ip_len) > ifp->if_mtu) {
sys/netinet/ip_output.c
655
if (ntohs(ip->ip_len) <= ifp->if_mtu ||
sys/netinet/ip_output.c
853
for (nfrags = 1; off < ntohs(ip->ip_len); off += len, nfrags++) {
sys/netinet/ip_output.c
879
mhip->ip_off = htons(((off - hlen) >> 3) + ntohs(ip->ip_off));
sys/netinet/ip_output.c
880
if (off + len >= ntohs(ip->ip_len)) { /* last fragment */
sys/netinet/ip_output.c
881
len = ntohs(ip->ip_len) - off;
sys/netinet/ip_output.c
914
m_adj(m0, hlen + firstlen - ntohs(ip->ip_len));
sys/netinet/ip_output.c
935
csum = in_cksum_skip(m, ntohs(ip->ip_len), offset);
sys/netinet/ip_output.c
970
if (optlen + (u_short)ntohs(ip->ip_len) > IP_MAXPACKET) {
sys/netinet/raw_ip.c
267
ip_len = ntohs(ip->ip_len); /* includes header */
sys/netinet/tcp_debug.c
167
ntohs(((struct ip *)ipgen)->ip_len);
sys/netinet/tcp_debug.c
171
len = ntohs((u_short)len);
sys/netinet/tcp_input.c
2688
to->to_mss = ntohs(to->to_mss);
sys/netinet/tcp_input.c
694
tlen = (sizeof *ip6) + ntohs(ip6->ip6_plen) - off0;
sys/netinet/tcp_input.c
728
tlen = ntohs(ip->ip_len) - off0;
sys/netinet/tcp_input.c
737
ntohs(ip->ip_len) +
sys/netinet/tcp_input.c
802
th->th_win = ntohs(th->th_win);
sys/netinet/tcp_input.c
803
th->th_urp = ntohs(th->th_urp);
sys/netinet/tcp_input.c
901
dbuf, ntohs(th->th_dport), sbuf,
sys/netinet/tcp_input.c
902
ntohs(th->th_sport), thflags);
sys/netinet/tcp_subr.c
1448
*arg = ntohs(icmp->icmp_nextmtu);
sys/netinet/udp_usrreq.c
193
return (ntohs(lport) % netisr_ncpus);
sys/netinet/udp_usrreq.c
421
len = ntohs((u_short)uh->uh_ulen);
sys/netinet/udp_usrreq.c
422
ip_len = ntohs(ip->ip_len) - iphlen;
sys/netinet/udp_usrreq.c
598
kinet_ntoa(ip->ip_dst, dst), ntohs(uh->uh_dport),
sys/netinet/udp_usrreq.c
599
kinet_ntoa(ip->ip_src, src), ntohs(uh->uh_sport));
sys/netinet6/frag6.c
219
(((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) {
sys/netinet6/frag6.c
293
fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK);
sys/netinet6/frag6.c
305
frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset;
sys/netinet6/icmp6.c
1162
qtype = ntohs(ni6->ni_qtype);
sys/netinet6/icmp6.c
2162
int icmp6len = ntohs(ip6->ip6_plen);
sys/netinet6/icmp6.c
2612
= in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen));
sys/netinet6/in6_pcb.c
188
lport_ho = ntohs(lport);
sys/netinet6/in6_pcb.c
440
sin6->sin6_scope_id = ntohs(sin6->sin6_addr.s6_addr16[1]);
sys/netinet6/in6_pcb.c
489
sin6->sin6_scope_id = ntohs(sin6->sin6_addr.s6_addr16[1]);
sys/netinet6/in6_pcb.c
988
sin6->sin6_scope_id = ntohs(sin6->sin6_addr.s6_addr16[1]);
sys/netinet6/in6_src.c
620
zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]);
sys/netinet6/ip6_input.c
551
plen = (u_int32_t)ntohs(ip6->ip6_plen);
sys/netinet6/ip6_input.c
916
*rtalertp = ntohs(rtalert_val);
sys/netinet6/ip6_mroute.c
1784
ntohs(eip6->ip6_plen));
sys/netinet6/ip6_output.c
577
origifp = ifindex2ifnet[ntohs(ip6->ip6_src.s6_addr16[1])];
sys/netinet6/ip6_output.c
579
origifp = ifindex2ifnet[ntohs(ip6->ip6_dst.s6_addr16[1])];
sys/netinet6/mld6.c
265
timer = ntohs(mldh->mld_maxdelay) * PR_FASTHZ /
sys/netinet6/nd6.c
994
ntohs(*(u_int16_t *)&addr->sin6_addr.s6_addr[2]) == ifp->if_index)
sys/netinet6/nd6_rtr.c
265
dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime);
sys/netinet6/udp6_usrreq.c
155
plen = ntohs(ip6->ip6_plen) - off + sizeof(*ip6);
sys/netinet6/udp6_usrreq.c
157
ulen = ntohs((u_short)uh->uh_ulen);
sys/netinet6/udp6_usrreq.c
340
buf, ntohs(uh->uh_dport),
sys/netinet6/udp6_usrreq.c
341
ip6_sprintf(&ip6->ip6_src), ntohs(uh->uh_sport));
sys/netproto/802_11/wlan/ieee80211_input.c
399
*framelen = ntohs(eh->ether_type) /* encap'd frame size */
sys/vfs/nfs/nfs_subs.c
1251
ntohs(saddr->sin_port) >= IPPORT_RESERVED) {
sys/vfs/nfs/nfs_syscalls.c
642
port = ntohs(sin->sin_port);
test/debug/wildcardinfo.c
165
ntohs(pcb.inp_inc.inc_lport),
test/debug/wildcardinfo.c
167
ntohs(pcb.inp_inc.inc_fport));
test/stress/webstress/webstress.c
160
ntohs(node->url_sin.sin_port),
test/stress/webstress/webstress.c
345
ntohs(node->url_sin.sin_port),
test/stress/webstress/webstress.c
369
ntohs(node->url_sin.sin_port),
test/udp/sendsrcaddr/udp_sendsrcaddr.c
110
ntohs(local.sin_port));
test/udp/sendsrcaddr/udp_sendsrcaddr.c
146
ntohs(local.sin_port));
tools/tools/net80211/w00t/redir/buddy.c
76
printf("Got %d bytes [%d]\n", len, ntohs(id));
tools/tools/net80211/w00t/redir/redir.c
484
id = ntohs(*ptr++);
tools/tools/net80211/w00t/redir/redir.c
485
len = ntohs(*ptr++);
tools/tools/net80211/wesside/dics/dics.c
156
*port = ntohs(s_in.sin_port);
tools/tools/net80211/wesside/dics/dics.c
181
*port = ntohs(uh->uh_sport);
tools/tools/net80211/wesside/dics/dics.c
272
iph->ip_len = ntohs(iph->ip_len);
tools/tools/net80211/wesside/dics/dics.c
278
ntohs(dst.sin_port));
tools/tools/net80211/wesside/wesside/wesside.c
2274
do_llc(ptr, ntohs(eh->ether_type));
tools/tools/net80211/wlanwatch/wlanwatch.c
199
ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
tools/tools/netrate/kq_sendrecv/kq_sendcli/kq_sendcli.c
499
ntohs(conn->c_in.sin_port),
tools/tools/netrate/kq_sendrecv/kq_sendcli/kq_sendcli.c
604
ntohs(da->sin_port));
tools/tools/netrate/kq_sendrecv/kq_sendcli/kq_sendcli.c
685
ntohs(conn->c_in.sin_port));
usr.bin/getent/getent.c
500
se->s_name, ntohs(se->s_port), se->s_proto)
usr.bin/netstat/inet.c
943
sprintf(cp, "%d ", ntohs((u_short)port));
usr.bin/netstat/inet6.c
1051
sprintf(cp, "%d", ntohs((u_short)port));
usr.bin/netstat/route.c
651
(u_int32_t)ntohs(*(u_short *)&in6->s6_addr[2]);
usr.bin/sdpquery/search.c
158
ntohs(*(uint16_t *)&uuid.b[4]),
usr.bin/sdpquery/search.c
159
ntohs(*(uint16_t *)&uuid.b[6]),
usr.bin/sdpquery/search.c
160
ntohs(*(uint16_t *)&uuid.b[8]),
usr.bin/sdpquery/search.c
161
ntohs(*(uint16_t *)&uuid.b[10]),
usr.bin/sdpquery/search.c
219
ntohs(*(uint16_t *)&value.int128.b[4]),
usr.bin/sdpquery/search.c
220
ntohs(*(uint16_t *)&value.int128.b[6]),
usr.bin/sdpquery/search.c
221
ntohs(*(uint16_t *)&value.int128.b[8]),
usr.bin/sdpquery/search.c
222
ntohs(*(uint16_t *)&value.int128.b[10]),
usr.bin/sdpquery/search.c
284
ntohs(*(uint16_t *)&value.int128.b[4]),
usr.bin/sdpquery/search.c
285
ntohs(*(uint16_t *)&value.int128.b[6]),
usr.bin/sdpquery/search.c
286
ntohs(*(uint16_t *)&value.int128.b[8]),
usr.bin/sdpquery/search.c
287
ntohs(*(uint16_t *)&value.int128.b[10]),
usr.bin/sdpquery/search.c
494
ntohs(*(uint16_t *)&uuid.b[4]),
usr.bin/sdpquery/search.c
495
ntohs(*(uint16_t *)&uuid.b[6]),
usr.bin/sdpquery/search.c
496
ntohs(*(uint16_t *)&uuid.b[8]),
usr.bin/sdpquery/search.c
497
ntohs(*(uint16_t *)&uuid.b[10]),
usr.bin/sockstat/sockstat.c
406
port = ntohs(((struct sockaddr_in *)ss)->sin_port);
usr.bin/sockstat/sockstat.c
412
port = ntohs(((struct sockaddr_in6 *)ss)->sin6_port);
usr.bin/sockstat/sockstat.c
457
port = ntohs(((struct sockaddr_in *)(&s->laddr))->sin_port);
usr.bin/sockstat/sockstat.c
459
port = ntohs(((struct sockaddr_in6 *)(&s->laddr))->sin6_port);
usr.bin/sockstat/sockstat.c
463
port = ntohs(((struct sockaddr_in *)(&s->faddr))->sin_port);
usr.bin/sockstat/sockstat.c
465
port = ntohs(((struct sockaddr_in6 *)(&s->faddr))->sin6_port);
usr.bin/systat/netbw.c
101
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_lport) >
usr.bin/systat/netbw.c
102
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_lport))
usr.bin/systat/netbw.c
104
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_fport) <
usr.bin/systat/netbw.c
105
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_fport))
usr.bin/systat/netbw.c
107
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_fport) >
usr.bin/systat/netbw.c
108
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_fport))
usr.bin/systat/netbw.c
349
ntohs(elm->xtcp.xt_inp.inp_inc.inc_ie.ie_lport)),
usr.bin/systat/netbw.c
354
ntohs(elm->xtcp.xt_inp.inp_inc.inc_ie.ie_fport)),
usr.bin/systat/netbw.c
450
ntohs(depaddr->id6_addr.s6_addr16[0]),
usr.bin/systat/netbw.c
451
ntohs(depaddr->id6_addr.s6_addr16[1]),
usr.bin/systat/netbw.c
452
ntohs(depaddr->id6_addr.s6_addr16[2]),
usr.bin/systat/netbw.c
453
ntohs(depaddr->id6_addr.s6_addr16[3]),
usr.bin/systat/netbw.c
454
ntohs(depaddr->id6_addr.s6_addr16[4]),
usr.bin/systat/netbw.c
455
ntohs(depaddr->id6_addr.s6_addr16[5]),
usr.bin/systat/netbw.c
456
ntohs(depaddr->id6_addr.s6_addr16[6]),
usr.bin/systat/netbw.c
457
ntohs(depaddr->id6_addr.s6_addr16[7]));
usr.bin/systat/netbw.c
88
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_lport) >= 1024 &&
usr.bin/systat/netbw.c
89
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_lport) >= 1024) {
usr.bin/systat/netbw.c
90
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_fport) <
usr.bin/systat/netbw.c
91
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_fport))
usr.bin/systat/netbw.c
93
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_fport) >
usr.bin/systat/netbw.c
94
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_fport))
usr.bin/systat/netbw.c
98
if (ntohs(tcp1->xtcp.xt_inp.inp_inc.inc_ie.ie_lport) <
usr.bin/systat/netbw.c
99
ntohs(tcp2->xtcp.xt_inp.inp_inc.inc_ie.ie_lport))
usr.bin/systat/netstat.c
403
ntohs((u_short)port));
usr.bin/systat/pftop.c
117
if (ntohs(nk1->port[0]) >= 1024 &&
usr.bin/systat/pftop.c
118
ntohs(nk2->port[0]) >= 1024) {
usr.bin/systat/pftop.c
119
if (ntohs(nk1->port[1]) < ntohs(nk2->port[1]))
usr.bin/systat/pftop.c
121
if (ntohs(nk1->port[1]) > ntohs(nk2->port[1]))
usr.bin/systat/pftop.c
124
if (ntohs(nk1->port[0]) < ntohs(nk2->port[0]))
usr.bin/systat/pftop.c
126
if (ntohs(nk1->port[0]) > ntohs(nk2->port[0]))
usr.bin/systat/pftop.c
128
if (ntohs(nk1->port[1]) < ntohs(nk2->port[1]))
usr.bin/systat/pftop.c
130
if (ntohs(nk1->port[1]) > ntohs(nk2->port[1]))
usr.bin/systat/pftop.c
472
port = ntohs(port);
usr.bin/systat/pftop.c
487
ntohs(addr->v6.s6_addr16[0]),
usr.bin/systat/pftop.c
488
ntohs(addr->v6.s6_addr16[1]),
usr.bin/systat/pftop.c
489
ntohs(addr->v6.s6_addr16[2]),
usr.bin/systat/pftop.c
490
ntohs(addr->v6.s6_addr16[3]),
usr.bin/systat/pftop.c
491
ntohs(addr->v6.s6_addr16[4]),
usr.bin/systat/pftop.c
492
ntohs(addr->v6.s6_addr16[5]),
usr.bin/systat/pftop.c
493
ntohs(addr->v6.s6_addr16[6]),
usr.bin/systat/pftop.c
494
ntohs(addr->v6.s6_addr16[7]));
usr.bin/systat/pftop.c
500
ntohs(addr->v6.s6_addr16[0]),
usr.bin/systat/pftop.c
501
ntohs(addr->v6.s6_addr16[1]),
usr.bin/systat/pftop.c
502
ntohs(addr->v6.s6_addr16[6]),
usr.bin/systat/pftop.c
503
ntohs(addr->v6.s6_addr16[7]));
usr.bin/talk/ctl_transact.c
103
rp->addr.sa_family = ntohs(rp->addr.sa_family);
usr.bin/talk/get_iface.c
67
local.sin_port = htons(ntohs(local.sin_port) + 1);
usr.bin/talk/get_iface.c
77
remote.sin_port = htons(ntohs(remote.sin_port) + 1);
usr.bin/tftp/tftp.c
159
ap->th_opcode = ntohs(ap->th_opcode);
usr.bin/tftp/tftp.c
160
ap->th_block = ntohs(ap->th_block);
usr.bin/tftp/tftp.c
273
dp->th_opcode = ntohs(dp->th_opcode);
usr.bin/tftp/tftp.c
274
dp->th_block = ntohs(dp->th_block);
usr.bin/tftp/tftp.c
387
u_short op = ntohs(tp->th_opcode);
usr.bin/tftp/tftp.c
404
printf("<block=%d, %d bytes>\n", ntohs(tp->th_block), n - 4);
usr.bin/tftp/tftp.c
408
printf("<block=%d>\n", ntohs(tp->th_block));
usr.bin/tftp/tftp.c
412
printf("<code=%d, msg=%s>\n", ntohs(tp->th_code), tp->th_msg);
usr.sbin/dntpd/ntpreq.c
42
fixed->int_parts = ntohs(fixed->int_parts);
usr.sbin/dntpd/ntpreq.c
43
fixed->fractions = ntohs(fixed->fractions);
usr.sbin/fwcontrol/fwdv.c
173
fprintf(stderr, "0x%04x\n", ntohs(ciph->fdf.dv.cyc));
usr.sbin/gifconfig/gifconfig.c
675
ntohs(*(u_int16_t *)&sin->sin6_addr.s6_addr[2]);
usr.sbin/gifconfig/gifconfig.c
695
ntohs(*(u_int16_t *)&sin->sin6_addr.s6_addr[2]);
usr.sbin/ifmcstat/ifmcstat.c
100
scopeid = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]);
usr.sbin/inetd/inetd.c
1263
ntohs(sep->se_ctrladdr4.sin_port));
usr.sbin/ndp/ndp.c
1271
linkid = ntohs(linkid);
usr.sbin/ndp/ndp.c
550
s6.sin6_scope_id = ntohs(*(u_int16_t *)&s6.sin6_addr.s6_addr[2]);
usr.sbin/pfctl/parse.y
2430
yyerror("invalid divert port: %u", ntohs($4.a));
usr.sbin/pfctl/parse.y
3968
r.rpool.proxy_port[0] = ntohs($9->rport.a);
usr.sbin/pfctl/parse.y
3975
ntohs($9->rport.a) +
usr.sbin/pfctl/parse.y
3976
(ntohs(
usr.sbin/pfctl/parse.y
3978
ntohs(
usr.sbin/pfctl/parse.y
3982
ntohs($9->rport.b);
usr.sbin/pfctl/parse.y
3986
ntohs($9->rport.b);
usr.sbin/pfctl/parse.y
4732
snprintf(a1, sizeof(a1), "%u", ntohs(port->port[0]));
usr.sbin/pfctl/parse.y
4733
snprintf(a2, sizeof(a2), "%u", ntohs(port->port[1]));
usr.sbin/pfctl/pf_print_state.c
190
printf(":%u", ntohs(port));
usr.sbin/pfctl/pf_print_state.c
192
printf("[%u]", ntohs(port));
usr.sbin/pfctl/pfctl_parser.c
1022
printf(" port %u", ntohs(r->divert.port));
usr.sbin/pfctl/pfctl_parser.c
316
p1 = ntohs(p1);
usr.sbin/pfctl/pfctl_parser.c
317
p2 = ntohs(p2);
usr.sbin/ppp/auth.c
404
if (len >= ntohs(authp->in.hdr.length))
usr.sbin/ppp/auth.c
408
ntohs(authp->in.hdr.length), len);
usr.sbin/ppp/cbcp.c
639
if (ntohs(head->length) != len) {
usr.sbin/ppp/cbcp.c
641
" - ignored\n", head->code, ntohs(head->length), len);
usr.sbin/ppp/chap.c
715
ntohs(chap->auth.in.hdr.length) == 0)
usr.sbin/ppp/command.c
1496
iport = ntohs(s->s_port);
usr.sbin/ppp/filter.c
84
return ntohs(servent->s_port);
usr.sbin/ppp/fsm.c
1000
len = ntohs(lhp->length) - sizeof *lhp;
usr.sbin/ppp/fsm.c
1058
if (ntohs(lh.length) > len) {
usr.sbin/ppp/fsm.c
1060
"- dropped\n", fp->link->name, len, (int)ntohs(lh.length));
usr.sbin/ppp/fsm.c
476
flen = ntohs(lhp->length) - sizeof *lhp;
usr.sbin/ppp/fsm.c
618
flen = ntohs(lhp->length) - sizeof *lhp;
usr.sbin/ppp/fsm.c
681
flen = ntohs(lhp->length) - sizeof *lhp;
usr.sbin/ppp/fsm.c
812
flen = ntohs(lhp->length) - sizeof *lhp;
usr.sbin/ppp/fsm.c
888
proto = ntohs(proto);
usr.sbin/ppp/fsm.c
959
if (lcp && ntohs(lhp->length) - sizeof *lhp >= 4) {
usr.sbin/ppp/fsm.c
971
ntohs(lhp->length) - sizeof *lhp, MB_ECHOOUT);
usr.sbin/ppp/ip.c
217
datalen = ntohs(pip6->ip6_plen);
usr.sbin/ppp/ip.c
233
len = ntohs(pip->ip_off) & IP_OFFMASK; /* fragment offset */
usr.sbin/ppp/ip.c
249
datalen = ntohs(pip->ip_len) - (pip->ip_hl << 2);
usr.sbin/ppp/ip.c
291
sport = ntohs(ih->icmp_type);
usr.sbin/ppp/ip.c
300
sport = ntohs(ih6->icmp6_type);
usr.sbin/ppp/ip.c
329
sport = ntohs(uh->uh_sport);
usr.sbin/ppp/ip.c
330
dport = ntohs(uh->uh_dport);
usr.sbin/ppp/ip.c
347
sport = ntohs(th->th_sport);
usr.sbin/ppp/ip.c
348
dport = ntohs(th->th_dport);
usr.sbin/ppp/ip.c
479
len = ntohs(uh->uh_ulen) - sizeof *uh;
usr.sbin/ppp/ip.c
489
*hptr++ = ntohs(*pktptr); /* Careful of macro side-effects ! */
usr.sbin/ppp/ip.c
517
qtype = dns_Qtype2Txt(ntohs(tmp));
usr.sbin/ppp/ip.c
519
qclass = dns_Qclass2Txt(ntohs(tmp));
usr.sbin/ppp/ip.c
563
datalen = ntohs(pip6->ip6_plen);
usr.sbin/ppp/ip.c
575
datalen = ntohs(pip->ip_len) - (pip->ip_hl << 2);
usr.sbin/ppp/ip.c
579
frag = ntohs(pip->ip_off) & IP_OFFMASK;
usr.sbin/ppp/ip.c
628
if (!frag && ncp_IsUrgentUdpPort(&bundle->ncp, ntohs(uh->uh_sport),
usr.sbin/ppp/ip.c
629
ntohs(uh->uh_dport)))
usr.sbin/ppp/ip.c
635
"UDP: %s:%d ---> ", ncpaddr_ntoa(&srcaddr), ntohs(uh->uh_sport));
usr.sbin/ppp/ip.c
638
"%s:%d (%d/%d)", ncpaddr_ntoa(&dstaddr), ntohs(uh->uh_dport),
usr.sbin/ppp/ip.c
652
switch (ntohs(proto)) {
usr.sbin/ppp/ip.c
779
ntohs(uh->uh_sport));
usr.sbin/ppp/ip.c
782
"%s:%d", ncpaddr_ntoa(&dstaddr), ntohs(uh->uh_dport));
usr.sbin/ppp/ip.c
792
if (!frag && ncp_IsUrgentTcpPort(&bundle->ncp, ntohs(th->th_sport),
usr.sbin/ppp/ip.c
793
ntohs(th->th_dport)))
usr.sbin/ppp/ip.c
799
"TCP: %s:%d ---> ", ncpaddr_ntoa(&srcaddr), ntohs(th->th_sport));
usr.sbin/ppp/ip.c
802
"%s:%d", ncpaddr_ntoa(&dstaddr), ntohs(th->th_dport));
usr.sbin/ppp/ip.c
820
if (ntohs(sp[0]) == 0x0204) {
usr.sbin/ppp/ip.c
822
" MSS = %d", ntohs(sp[1]));
usr.sbin/ppp/ip.c
873
if (filter && uh && ntohs(uh->uh_dport) == 53 && log_IsKept(LogDNS))
usr.sbin/ppp/ipcp.c
1097
compproto = (ntohs(pcomp->proto) << 16) + ((int)pcomp->slots << 8) +
usr.sbin/ppp/ipcp.c
1108
if (ntohs(pcomp->proto) == PROTO_VJCOMP) {
usr.sbin/ppp/ipcp.c
1123
if (ntohs(pcomp->proto) == PROTO_VJCOMP) {
usr.sbin/ppp/ipcp.c
1158
if (ntohs(pcomp->proto) == PROTO_VJCOMP) {
usr.sbin/ppp/ipcp.c
1162
compproto = (ntohs(pcomp->proto) << 16) + (pcomp->slots << 8) +
usr.sbin/ppp/lcp.c
934
request, ntohs(req->proto), (u_long)ntohl(req->period) * 10);
usr.sbin/ppp/lcp.c
937
if (ntohs(req->proto) != PROTO_LQR || !IsAccepted(lcp->cfg.lqr)) {
usr.sbin/ppp/mppe.c
257
prefix = ntohs(prefix);
usr.sbin/ppp/mppe.c
360
*proto = ntohs(*proto);
usr.sbin/ppp/nat_cmd.c
337
*port = ntohs(sp->s_port);
usr.sbin/ppp/nat_cmd.c
485
bp->m_len = ntohs(((struct ip *)MBUF_CTOP(bp))->ip_len);
usr.sbin/ppp/nat_cmd.c
508
bp->m_len = ntohs(((struct ip *)MBUF_CTOP(bp))->ip_len);
usr.sbin/ppp/nat_cmd.c
536
len = ntohs(((struct ip *)fptr)->ip_len);
usr.sbin/ppp/ncpaddr.c
177
ntohs(*(u_short *)&sin6->sin6_addr.s6_addr[2]);
usr.sbin/ppp/ncpaddr.c
901
if ((scopeid = ntohs(*(const u_short *)&sin6->s6_addr[2])) == 0)
usr.sbin/ppp/pap.c
202
ntohs(authp->in.hdr.length) == 0) {
usr.sbin/ppp/server.c
122
if (ntohs(sin->sin_port) < 1024) {
usr.sbin/ppp/server.c
125
ncpaddr_ntoa(&addr), ntohs(sin->sin_port));
usr.sbin/ppp/server.c
131
ncpaddr_ntoa(&addr), ntohs(sin->sin_port));
usr.sbin/ppp/server.c
137
if (ntohs(sin6->sin6_port) < 1024) {
usr.sbin/ppp/server.c
140
ncpaddr_ntoa(&addr), ntohs(sin6->sin6_port));
usr.sbin/ppp/server.c
146
ncpaddr_ntoa(&addr), ntohs(sin6->sin6_port));
usr.sbin/ppp/server.c
171
ncpaddr_ntoa(&addr), ntohs(sin->sin_port));
usr.sbin/ppp/server.c
177
ncpaddr_ntoa(&addr), ntohs(sin6->sin6_port));
usr.sbin/ppp/slcompress.c
123
(f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
usr.sbin/ppp/slcompress.c
126
(f) = htons(ntohs(f) + (u_int32_t)*cp++); \
usr.sbin/ppp/slcompress.c
273
deltaS = ntohs(th->th_urp);
usr.sbin/ppp/slcompress.c
285
deltaS = (u_short) (ntohs(th->th_win) - ntohs(oth->th_win));
usr.sbin/ppp/slcompress.c
318
ntohs(cs->cs_ip.ip_len) == hlen)
usr.sbin/ppp/slcompress.c
334
deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
usr.sbin/ppp/slcompress.c
342
if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
usr.sbin/ppp/slcompress.c
350
deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
usr.sbin/ppp/slcompress.c
362
deltaA = ntohs(th->th_sum);
usr.sbin/ppp/slcompress.c
499
i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
usr.sbin/ppp/slcompress.c
506
th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len)
usr.sbin/ppp/slcompress.c
530
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
usr.sbin/ppp/tcp.c
200
inet_ntoa(sock.sin_addr), ntohs(sock.sin_port));
usr.sbin/ppp/tcpmss.c
131
if (ntohs(*mss) > maxmss) {
usr.sbin/ppp/tcpmss.c
133
ntohs(*mss), maxmss);
usr.sbin/ppp/tcpmss.c
162
if (pip->ip_p == IPPROTO_TCP && (ntohs(pip->ip_off) & IP_OFFMASK) == 0 &&
usr.sbin/ppp/tcpmss.c
163
ntohs(pip->ip_len) == plen && hlen <= plen &&
usr.sbin/ppp/udp.c
125
inet_ntoa(dev->sock.sin_addr), ntohs(dev->sock.sin_port));
usr.sbin/rarpd/rarpd.c
442
if (ntohs(ep->ether_type) != ETHERTYPE_REVARP ||
usr.sbin/rarpd/rarpd.c
443
ntohs(ap->arp_hrd) != ARPHRD_ETHER ||
usr.sbin/rarpd/rarpd.c
444
ntohs(ap->arp_op) != REVARP_REQUEST ||
usr.sbin/rarpd/rarpd.c
445
ntohs(ap->arp_pro) != ETHERTYPE_IP ||
usr.sbin/rip6query/rip6query.c
170
printf(" tag=0x%x", ntohs(np->rip6_tag));
usr.sbin/route6d/route6d.c
1082
ifcp->ifc_name, inet6_n2p(&nh), ntohs(fsock.sin6_port), nn);
usr.sbin/route6d/route6d.c
1132
trace(2, " tag=0x%04x", ntohs(np->rip6_tag) & 0xffff);
usr.sbin/route6d/route6d.c
2893
ntohs(rrt->rrt_info.rip6_tag) & 0xffff);
usr.sbin/route6d/route6d.c
667
inet6_n2p(&sin->sin6_addr), ntohs(sin->sin6_port));
usr.sbin/route6d/route6d.c
670
nrt, inet6_n2p(&sin->sin6_addr), ntohs(sin->sin6_port));
usr.sbin/route6d/route6d.c
688
ntohs(np->rip6_tag) & 0xffff);
usr.sbin/rpcbind/security.c
140
(ntohs(sin->sin_port) < IPPORT_RESERVED));
usr.sbin/rpcbind/security.c
147
(ntohs(sin6->sin6_port) < IPV6PORT_RESERVED));
usr.sbin/rpcbind/util.c
104
ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]);
usr.sbin/rwhod/rwhod.c
333
ntohs(from.sin_port), inet_ntoa(from.sin_addr));
usr.sbin/rwhod/rwhod.c
699
ntohs(sock_in->sin_port));
usr.sbin/sdpd/server.c
487
&& (sizeof(*pdu) + (pdu->len = ntohs(pdu->len))) == len) {
usr.sbin/sdpd/server.c
555
pdu->pid, ntohs(pdu->tid), error);
usr.sbin/sdpd/server.c
561
pdu->pid, ntohs(pdu->tid), pdu->len, len, error);
usr.sbin/sdpd/server.c
568
pdu->pid, ntohs(pdu->tid), error);
usr.sbin/syslogd/syslogd.c
1183
port = (int)ntohs(((struct sockaddr_in *)
usr.sbin/syslogd/syslogd.c
1709
port = (int)ntohs(((struct sockaddr_in *)
usr.sbin/syslogd/syslogd.c
2211
ap.port = ntohs(se->s_port);
usr.sbin/syslogd/syslogd.c
2219
ap.port = ntohs(se->s_port);
usr.sbin/traceroute/traceroute.c
817
obj_len = ntohs(obj_hdr->length);
usr.sbin/traceroute6/traceroute6.c
717
srcport = ntohs(Src.sin6_port);
usr.sbin/trpt/trpt.c
348
ntohs(th->th_sport));
usr.sbin/trpt/trpt.c
356
ntohs(th->th_dport));
usr.sbin/trpt/trpt.c
370
len = ntohs(len);
usr.sbin/trpt/trpt.c
371
win = ntohs(win);
usr.sbin/vknetd/filter.c
59
ether_type = ntohs(*(u_int16_t *)(pkt + 12));
usr.sbin/ypbind/ypbind.c
261
if (ntohs(fromsin->sin_port) >= IPPORT_RESERVED) {
usr.sbin/ypbind/ypbind.c
836
if ((ypsecuremode && (ntohs(raddrp->sin_port) >= IPPORT_RESERVED))) {
usr.sbin/ypbind/ypbind.c
838
inet_ntoa(raddrp->sin_addr), ntohs(raddrp->sin_port),
usr.sbin/ypserv/yp_access.c
236
ntohs(rqhost->sin_port));
usr.sbin/ypserv/yp_access.c
247
ntohs(rqhost->sin_port));
usr.sbin/ypserv/yp_access.c
259
ntohs(rqhost->sin_port) >= IPPORT_RESERVED) {
usr.sbin/ypserv/yp_access.c
261
not privileged", map, inet_ntoa(rqhost->sin_addr), ntohs(rqhost->sin_port));
usr.sbin/ypserv/yp_access.c
298
ntohs(rqhost->sin_port),
usr.sbin/ypserv/yp_dnslookup.c
184
id = ntohs(hptr->id);
usr.sbin/ypserv/yp_dnslookup.c
378
(q = yp_find_dnsqent(ntohs(hptr->id), BY_DNS_ID)) == NULL) {