crypto/libressl/apps/openssl/s_socket.c
181
server.sin_port = htons((unsigned short) port);
crypto/libressl/crypto/bio/bss_conn.c
189
c->them.sin_port = htons((unsigned short)c->port);
crypto/openssh/addr.c
82
in4->sin_port = htons(port);
crypto/openssh/addr.c
94
in6->sin6_port = htons(port);
crypto/openssh/channels.c
3865
*lport_p = htons(*allocated_listen_port);
crypto/openssh/ssh.c
599
sin_port = htons(port);
crypto/openssh/ssh.c
603
sin6_port = htons(port);
games/hunt/hunt/list.c
127
htons(driver->response);
games/hunt/hunt/list.c
185
htons(Server_port);
games/hunt/hunt/list.c
189
msg = htons(req);
games/hunt/huntd/driver.c
430
if (test_port.sin_port != htons((u_short) Server_port)) {
games/hunt/huntd/driver.c
438
test_port.sin_port = htons((u_short) Server_port);
include/protocols/routed.h
70
#define RIP_AF_INET htons(AF_INET)
include/protocols/routed.h
87
#define RIP_AUTH_PW htons(2) /* password type */
include/protocols/routed.h
88
#define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */
lib/libalias/alias_db.c
627
port_net = htons(port_sys);
lib/libalias/alias_db.c
685
port_net = htons(port_sys);
lib/libalias/alias_db.c
818
dst_port, htons(port_sys + j),
lib/libalias/alias_db.c
824
return (htons(port_sys));
lib/libalias/alias_ftp.c
471
htons(true_port), 0, IPPROTO_TCP, 1);
lib/libalias/alias_ftp.c
557
new_len = htons(hlen + slen);
lib/libalias/alias_irc.c
236
true_port = htons(org_port);
lib/libalias/alias_irc.c
273
"%u", htons(alias_port) );
lib/libalias/alias_irc.c
315
new_len = htons(hlen + iCopy + copyat);
lib/libalias/alias_proxy.c
357
pip->ip_len = htons(ntohs(pip->ip_len) + slen);
lib/libalias/alias_proxy.c
425
pip->ip_len = htons(ntohs(pip->ip_len) + OPTION_LEN_BYTES);
lib/libalias/alias_proxy.c
826
proxy_entry->proxy_port = htons(proxy_port);
lib/libalias/alias_proxy.c
827
proxy_entry->server_port = htons(server_port);
lib/libalias/alias_smedia.c
215
sport = htons(p[0]);
lib/libalias/alias_smedia.c
216
eport = htons(p[1]);
lib/libalias/alias_smedia.c
239
htons(base_port + j), htons(base_alias + j),
lib/libalias/alias_smedia.c
255
ealias = htons(base_alias + (RTSP_PORT_GROUP - 1));
lib/libalias/alias_smedia.c
306
new_len = htons(hlen + new_dlen);
lib/libalias/alias_util.c
129
sum += htons((u_short) ntcp);
lib/libalias/alias_util.c
130
sum += htons((u_short) pip->ip_p);
lib/libc/citrus/citrus_db_factory.c
175
*p = htons(val);
lib/libc/net/getaddrinfo.c
1317
port = htons(port);
lib/libc/net/getservent.c
179
serv->s_port = htons((in_port_t)l);
lib/libc/net/name6.c
853
((struct sockaddr_in *)&ss)->sin_port = htons(1);
lib/libc/net/name6.c
857
((struct sockaddr_in6 *)&ss)->sin6_port = htons(1);
lib/libc/net/rcmd.c
347
sin.sin_port = htons((u_short)*alport);
lib/libc/resolv/res_findzonecut.c
615
arr->addr.sin.sin_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_findzonecut.c
624
arr->addr.sin.sin_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_init.c
191
u[nserv].sin.sin_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_init.c
203
u[nserv].sin6.sin6_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_mkquery.c
122
hp->id = htons(++statp->id);
lib/libc/resolv/res_mkquery.c
148
hp->qdcount = htons(1);
lib/libc/resolv/res_mkquery.c
169
hp->arcount = htons(1);
lib/libc/resolv/res_mkquery.c
191
hp->ancount = htons(1);
lib/libc/resolv/res_mkquery.c
249
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libc/resolv/res_mkupdate.c
1127
serv.s_port = htons((u_int16_t)lp->port);
lib/libc/resolv/res_mkupdate.c
113
hp->id = htons(++statp->id);
lib/libc/resolv/res_mkupdate.c
1180
ss = cgetservbyport(htons(port), proto);
lib/libc/resolv/res_mkupdate.c
720
hp->qdcount = htons(counts[0]);
lib/libc/resolv/res_mkupdate.c
721
hp->ancount = htons(counts[1]);
lib/libc/resolv/res_mkupdate.c
722
hp->nscount = htons(counts[2]);
lib/libc/resolv/res_mkupdate.c
723
hp->arcount = htons(counts[3]);
lib/libc/rpc/clnt_bcast.c
588
htons((u_short)port);
lib/libc/rpc/pmap_getmaps.c
81
address->sin_port = htons(PMAPPORT);
lib/libc/rpc/pmap_getport.c
76
address->sin_port = htons(PMAPPORT);
lib/libc/rpc/pmap_rmt.c
89
addr->sin_port = htons(PMAPPORT);
lib/libc/rpc/rpc_generic.c
689
sin->sin_port = htons(port);
lib/libc/rpc/rpc_generic.c
706
sin6->sin6_port = htons(port);
lib/libc/rpc/rpc_soc.c
117
raddr->sin_port = htons(sport);
lib/libc/rpc/rpc_soc.c
278
addr->sin_port = htons(PMAPPORT);
lib/libc/rpc/rpcb_clnt.c
806
port = htons(port);
lib/libdmsg/subs.c
114
lsin.sin_port = htons(DMSG_LISTEN_PORT);
lib/libfetch/common.c
465
port = htons(port);
lib/libfetch/ftp.c
748
sin6->sin6_port = htons(port);
lib/libfetch/ftp.c
757
sin4->sin_port = htons(port);
lib/libfetch/ftp.c
839
htons(sin6->sin6_port));
lib/libftpio/ftpio.c
1012
htons(sin.sin6.sin6_port));
lib/libftpio/ftpio.c
915
sin.sin4.sin_port = htons(port);
lib/libftpio/ftpio.c
918
sin.sin6.sin6_port = htons(port);
lib/libldns/ldns/util.h
102
* (uint16_t *) dst = htons(data);
lib/libsdp/search.c
161
xpdu.pdu.tid = htons(ss->tid);
lib/libsdp/search.c
162
xpdu.pdu.len = htons(req_cs - ss->req);
lib/libsdp/service.c
100
pdu.tid = htons(++ss->tid);
lib/libsdp/service.c
101
pdu.len = htons(sizeof(uuid) + sizeof(*bdaddr) + datalen);
lib/libsdp/service.c
103
uuid = htons(uuid);
lib/libsdp/service.c
166
pdu.tid = htons(++ss->tid);
lib/libsdp/service.c
167
pdu.len = htons(sizeof(handle));
lib/libsdp/service.c
210
pdu.tid = htons(++ss->tid);
lib/libsdp/service.c
211
pdu.len = htons(sizeof(handle) + datalen);
lib/libsdp/service.c
213
handle = htons(handle);
libexec/bootpd/bootpd.c
1093
send_addr.sin_port = htons(port);
libexec/bootpd/bootpd.c
453
bind_addr.sin_port = htons(bootps_port);
libexec/bootpd/bootpgw/bootpgw.c
408
bind_addr.sin_port = htons(bootps_port);
libexec/bootpd/bootpgw/bootpgw.c
587
send_addr.sin_port = htons(bootps_port);
libexec/bootpd/bootpgw/bootpgw.c
639
send_addr.sin_port = htons(bootpc_port);
libexec/bootpd/tools/bootptest/bootptest.c
270
sin_server.sin_port = htons(bootps_port);
libexec/bootpd/tools/bootptest/bootptest.c
289
sin_client.sin_port = htons(bootpc_port);
libexec/bootpd/tools/bootptest/bootptest.c
408
bp->bp_secs = htons(secs);
libexec/ftpd/ftpd.c
1812
data_source.su_port = htons(dataport);
libexec/ftpd/ftpd.c
2457
af, hname, htons(tmp.su_port));
libexec/ftpd/ftpd.c
556
data_source.su_port = htons(ntohs(ctrl_addr.su_port) - 1);
libexec/rbootd/rmp_var.h
145
{ (w).val[_WORD_HIGHPART] = htons((u_int16_t) ((i >> 16) & 0xffff)); \
libexec/rbootd/rmp_var.h
146
(w).val[_WORD_LOWPART] = htons((u_int16_t) (i & 0xffff)); \
libexec/rbootd/rmpproto.c
183
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
libexec/rbootd/rmpproto.c
236
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
libexec/rbootd/rmpproto.c
305
rpl->r_brpl.rmp_session = htons(GenSessID());
libexec/rbootd/rmpproto.c
306
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
libexec/rbootd/rmpproto.c
439
req->r_rrq.rmp_size = htons(RMPREADDATA);
libexec/rbootd/rmpproto.c
560
rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr));
libexec/rbootd/rmpproto.c
565
rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP);
libexec/rbootd/rmpproto.c
566
rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP);
libexec/talkd/process.c
117
rp->addr.sa_family = htons(ptr->addr.sa_family);
libexec/talkd/talkd.c
106
mp->ctl_addr.sa_family = htons(mp->ctl_addr.sa_family);
libexec/tftpd/tftpd.c
596
dp->th_opcode = htons((u_short)DATA);
libexec/tftpd/tftpd.c
597
dp->th_block = htons((u_short)block);
libexec/tftpd/tftpd.c
671
ap->th_opcode = htons((u_short)ACK);
libexec/tftpd/tftpd.c
672
ap->th_block = htons((u_short)block);
libexec/tftpd/tftpd.c
714
ap->th_opcode = htons((u_short)ACK); /* send the "final" ack */
libexec/tftpd/tftpd.c
715
ap->th_block = htons((u_short)(block));
libexec/tftpd/tftpd.c
776
tp->th_opcode = htons((u_short)ERROR);
libexec/tftpd/tftpd.c
777
tp->th_code = htons((u_short)error);
libexec/tftpd/tftpd.c
827
tp->th_opcode = htons((u_short)OACK);
libexec/ypxfr/ypxfr_main.c
248
ypxfr_callback_addr.sin_port = htons((u_short)atoi(argv[my_optind]));
sbin/dhclient/bpf.c
250
dhcp_bpf_wfilter[7].k = htons(IP_MF|IP_OFFMASK);
sbin/dhclient/convert.c
104
u_int16_t tmp = htons(val);
sbin/dhclient/convert.c
112
int16_t tmp = htons(val);
sbin/dhclient/dhclient.c
1029
client->packet.secs = htons(interval);
sbin/dhclient/dhclient.c
1031
client->packet.secs = htons(65535);
sbin/dhclient/dhclient.c
1205
destination.sin_port = htons(REMOTE_PORT);
sbin/dhclient/dhclient.c
1219
client->packet.secs = htons(interval);
sbin/dhclient/dhclient.c
1221
client->packet.secs = htons(65535);
sbin/dhclient/dhclient.c
417
sockaddr_broadcast.sin_port = htons(REMOTE_PORT);
sbin/dhclient/packet.c
103
eh.ether_type = htons(ETHERTYPE_IP);
sbin/dhclient/packet.c
119
ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
sbin/dhclient/packet.c
132
udp.uh_sport = htons(LOCAL_PORT); /* XXX */
sbin/dhclient/packet.c
134
udp.uh_ulen = htons(sizeof(udp) + len);
sbin/dhclient/packet.c
85
return (htons(sum));
sbin/hammer2/cmd_service.c
174
lsin.sin_port = htons(DMSG_LISTEN_PORT);
sbin/ip6fw/ip6fw.c
175
se = getservbyport(htons(port), protocol);
sbin/ip6fw/ip6fw.c
633
val = htons(s->s_port);
sbin/ipfw/ipfw2.c
2652
c->port = htons(c->port);
sbin/ipfw/ipfw2.c
3246
htons(strtoul(*av, NULL, 0)));
sbin/ipfw/ipfw2.c
401
se = getservbyport(htons(port), pe ? pe->p_name : NULL);
sbin/ipfw3/ipfw3nat.c
254
htons(ioc->src_port));
sbin/ipfw3/ipfw3nat.c
256
htons(ioc->alias_port));
sbin/ipfw3/ipfw3nat.c
258
htons(ioc->dst_port));
sbin/ipfw3/ipfw3state.c
176
htons(ioc->src_port));
sbin/ipfw3/ipfw3state.c
178
htons(ioc->dst_port));
sbin/iscontrol/fsm.c
597
p->CID = htons(1);
sbin/iscontrol/login.c
291
lp->CID = htons(1);
sbin/iscontrol/login.c
331
lp->CID = htons(1);
sbin/iscontrol/login.c
377
lp->CID = htons(1); // sess->cid?
sbin/mount_hammer2/mount_hammer2.c
238
lsin.sin_port = htons(DMSG_LISTEN_PORT);
sbin/mountd/mountd.c
587
sin->sin_port = htons(0);
sbin/mountd/mountd.c
598
sin6->sin6_port = htons(0);
sbin/natd/icmp.c
100
ip->ip_len = htons(sizeof(struct ip) + icmpLen);
sbin/natd/icmp.c
75
icmp->icmp_nextmtu = htons(mtu);
sbin/natd/natd.c
1447
htons(localPort + i),
sbin/natd/natd.c
1449
htons(remotePortCopy),
sbin/natd/natd.c
1451
htons(publicPort + i),
sbin/natd/natd.c
1467
PacketAliasAddServer(alink, localAddr, htons(localPort));
sbin/natd/natd.c
1572
PacketAliasAddServer(alink, localAddr, htons(~0));
sbin/natd/natd.c
1602
return htons(port);
sbin/ping/ping.c
576
ip->ip_off = df ? htons(IP_DF) : 0;
sbin/ping/ping.c
877
icp->icmp_seq = htons(ntransmitted);
sbin/ping/ping.c
904
ip->ip_len = htons(cc);
sbin/ping6/ping6.c
1112
nip->ni_qtype = htons(NI_QTYPE_FQDN);
sbin/ping6/ping6.c
1113
nip->ni_flags = htons(0);
sbin/ping6/ping6.c
1127
nip->ni_qtype = htons(NI_QTYPE_FQDN);
sbin/ping6/ping6.c
1128
nip->ni_flags = htons(0);
sbin/ping6/ping6.c
1139
nip->ni_qtype = htons(NI_QTYPE_NODEADDR);
sbin/ping6/ping6.c
1153
nip->ni_qtype = htons(NI_QTYPE_SUPTYPES);
sbin/ping6/ping6.c
1165
icp->icmp6_id = htons(ident);
sbin/rconfig/client.c
93
sain.sin_port = htons(257);
sbin/rconfig/server.c
78
sain.sin_port = htons(257);
sbin/route/route.c
1116
htons(su->sin6.sin6_scope_id);
sbin/routed/input.c
209
} else if (from->sin_port == htons(RIP_PORT)) {
sbin/routed/input.c
217
if (from->sin_port == htons(RIP_PORT)) {
sbin/routed/input.c
287
if (from->sin_port != htons(RIP_PORT)) {
sbin/routed/input.c
423
if (from->sin_port != htons(RIP_PORT)) {
sbin/routed/main.c
629
in.sin_port = htons(RIP_PORT);
sbin/routed/output.c
104
in.sin_port = htons(RIP_PORT);
sbin/routed/output.c
290
na2->a_type = htons(1);
sbin/routed/output.c
291
na->au.a_md5.md5_pkt_len = htons(len);
sbin/routed/rdisc.c
788
u.ad.icmp_ad_life = stopint ? 0 : htons(ifp->int_rdisc_int*3);
sbin/routed/rtquery/rtquery.c
313
myaddr.sin_port = htons(IPPORT_RESERVED-1);
sbin/routed/rtquery/rtquery.c
320
myaddr.sin_port = htons(ntohs(myaddr.sin_port)-1);
sbin/routed/rtquery/rtquery.c
370
NA0.au.a_md5.md5_pkt_len = htons(cc);
sbin/routed/rtquery/rtquery.c
372
NA2.a_type = htons(1);
sbin/routed/rtquery/rtquery.c
495
router.sin_port = htons(RIP_PORT);
share/examples/find_interface/find_interface.c
76
remote.sin_port = htons(60000);
share/examples/find_interface/find_interface.c
81
local.sin_port = htons(60000);
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/lib/arp.c
108
ah->arp_hrd = htons(ARPHRD_ETHER);
stand/lib/arp.c
109
ah->arp_pro = htons(ETHERTYPE_IP);
stand/lib/arp.c
112
ah->arp_op = htons(ARPOP_REQUEST);
stand/lib/arp.c
194
if (ah->arp_hrd != htons(ARPHRD_ETHER) ||
stand/lib/arp.c
195
ah->arp_pro != htons(ETHERTYPE_IP) ||
stand/lib/arp.c
206
if (ah->arp_op == htons(ARPOP_REQUEST)) {
stand/lib/arp.c
215
if (ah->arp_op != htons(ARPOP_REPLY)) {
stand/lib/arp.c
255
if (arp->arp_hrd != htons(ARPHRD_ETHER) ||
stand/lib/arp.c
256
arp->arp_pro != htons(ETHERTYPE_IP) ||
stand/lib/arp.c
267
if (arp->arp_op != htons(ARPOP_REQUEST)) {
stand/lib/arp.c
285
arp->arp_op = htons(ARPOP_REPLY);
stand/lib/bootp.c
142
d->myport = htons(IPPORT_BOOTPC);
stand/lib/bootp.c
144
d->destport = htons(IPPORT_BOOTPS);
stand/lib/bootp.c
261
bp->bp_secs = htons((u_short)(getsecs() - bot));
stand/lib/bootparam.c
160
d->myport = htons(rpc_newport());
stand/lib/bootparam.c
275
d->myport = htons(rpc_newport());
stand/lib/ether.c
70
eh->ether_type = htons(etype);
stand/lib/nfs.c
425
desc->myport = htons(rpc_newport());
stand/lib/rarp.c
179
if (ap->arp_hrd != htons(ARPHRD_ETHER) ||
stand/lib/rarp.c
180
ap->arp_pro != htons(ETHERTYPE_IP) ||
stand/lib/rarp.c
191
if (ap->arp_op != htons(ARPOP_REVREPLY)) {
stand/lib/rarp.c
94
ap->arp_hrd = htons(ARPHRD_ETHER);
stand/lib/rarp.c
95
ap->arp_pro = htons(ETHERTYPE_IP);
stand/lib/rarp.c
98
ap->arp_op = htons(ARPOP_REVREQUEST);
stand/lib/rpc.c
139
d->destport = htons(port);
stand/lib/tftp.c
149
if (htons(t->th_block) != (uint16_t)d->xid) {
stand/lib/tftp.c
205
wbuf.t.th_opcode = htons((u_short) RRQ);
stand/lib/tftp.c
216
h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff));
stand/lib/tftp.c
217
h->iodesc->destport = htons(IPPORT_TFTP);
stand/lib/tftp.c
249
wbuf.t.th_opcode = htons((u_short) ACK);
stand/lib/tftp.c
251
wbuf.t.th_block = htons((u_short) h->currblock);
stand/lib/udp.c
157
if (ah->ar_op == htons(ARPOP_REQUEST)) {
stand/lib/udp.c
212
ip->ip_len = htons(sizeof(*ip));
stand/lib/udp.c
87
ip->ip_len = htons(len);
stand/lib/udp.c
96
uh->uh_ulen = htons(len - sizeof(*ip));
sys/dev/disk/nata/atapi-cd.c
1398
d->length = htons(length - 2);
sys/dev/disk/nata/atapi-cd.c
1488
d->length = htons(length - 2);
sys/dev/disk/nata/atapi-cd.c
1538
d->length = htons(length - 2);
sys/dev/netif/alc/if_alc.c
2530
if (eh->ether_type == htons(ETHERTYPE_VLAN)) {
sys/dev/netif/alc/if_alc.c
2574
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/netif/alc/if_alc.c
2612
vtag = htons(m->m_pkthdr.ether_vlantag);
sys/dev/netif/bge/if_bge.c
3774
CSR_WRITE_4(sc, BGE_MAC_ADDR1_LO, htons(m[0]));
sys/dev/netif/bge/if_bge.c
3775
CSR_WRITE_4(sc, BGE_MAC_ADDR1_HI, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/netif/bge/if_bge.c
5130
ip->ip_len = htons(mss + iphlen + thoff);
sys/dev/netif/bnx/if_bnx.c
3625
CSR_WRITE_4(sc, BGE_MAC_ADDR1_LO, htons(m[0]));
sys/dev/netif/bnx/if_bnx.c
3626
CSR_WRITE_4(sc, BGE_MAC_ADDR1_HI, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/netif/bnx/if_bnx.c
5164
ip->ip_len = htons(mss + iphlen + thoff);
sys/dev/netif/de/if_de.c
225
mtod(m, struct ether_header *)->ether_type = htons(3);
sys/dev/netif/em/if_em.c
3844
mp->m_pkthdr.csum_data = htons(0xffff);
sys/dev/netif/emx/if_emx.c
467
mp->m_pkthdr.csum_data = htons(0xffff);
sys/dev/netif/igb/if_igb.c
380
mp->m_pkthdr.csum_data = htons(0xffff);
sys/dev/netif/ix/if_ix.c
2886
mp->m_pkthdr.csum_data = htons(0xffff);
sys/dev/netif/msk/if_msk.c
2463
if (eh->ether_type == htons(ETHERTYPE_VLAN)) {
sys/dev/netif/msk/if_msk.c
2528
htons(m->m_pkthdr.ether_vtag));
sys/dev/netif/mxge/if_mxge.c
2160
if (__predict_false(eh->ether_type != htons(ETHERTYPE_IP)))
sys/dev/netif/mxge/if_mxge.c
2205
*csum = htons(*csum);
sys/dev/netif/mxge/if_mxge.c
2266
if (eh->ether_type == htons(ETHERTYPE_VLAN))
sys/dev/netif/mxge/if_mxge.c
2323
if (eh->ether_type == htons(ETHERTYPE_VLAN))
sys/dev/netif/oce/oce_if.c
1047
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/netif/oce/oce_if.c
2173
if (eh->ether_type == htons(ETHERTYPE_IPV6)) {
sys/dev/netif/sf/if_sf.c
298
(idx * SF_RXFILT_PERFECT_SKIP), htons(p[2]));
sys/dev/netif/sf/if_sf.c
300
(idx * SF_RXFILT_PERFECT_SKIP) + 4, htons(p[1]));
sys/dev/netif/sf/if_sf.c
302
(idx * SF_RXFILT_PERFECT_SKIP) + 8, htons(p[0]));
sys/dev/netif/sk/if_sk.c
1909
if (eh->ether_type == htons(ETHERTYPE_VLAN)) {
sys/dev/netif/sk/if_sk.c
1913
if (xp[1] != htons(ETHERTYPE_IP))
sys/dev/netif/sk/if_sk.c
1921
} else if (eh->ether_type != htons(ETHERTYPE_IP)) {
sys/dev/netif/sk/if_sk.c
1961
if (ip->ip_off & htons(IP_MF | IP_OFFMASK))
sys/dev/netif/ti/if_ti.c
1999
CSR_WRITE_4(sc, TI_GCR_PAR0, htons(m[0]));
sys/dev/netif/ti/if_ti.c
2000
CSR_WRITE_4(sc, TI_GCR_PAR1, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/netif/ti/if_ti.c
961
CSR_WRITE_4(sc, TI_GCR_MAR0, htons(m[0]));
sys/dev/netif/ti/if_ti.c
962
CSR_WRITE_4(sc, TI_GCR_MAR1, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/netif/ti/if_ti.c
966
ext[0] = htons(m[0]);
sys/dev/netif/ti/if_ti.c
967
ext[1] = (htons(m[1]) << 16) | htons(m[2]);
sys/dev/netif/ti/if_ti.c
987
CSR_WRITE_4(sc, TI_GCR_MAR0, htons(m[0]));
sys/dev/netif/ti/if_ti.c
988
CSR_WRITE_4(sc, TI_GCR_MAR1, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/netif/ti/if_ti.c
992
ext[0] = htons(m[0]);
sys/dev/netif/ti/if_ti.c
993
ext[1] = (htons(m[1]) << 16) | htons(m[2]);
sys/dev/netif/txp/if_txp.c
1262
(htons(m->m_pkthdr.ether_vlantag) <<
sys/dev/netif/txp/if_txp.c
726
m->m_pkthdr.ether_vlantag = htons(rxd->rx_vlan >> 16);
sys/dev/netif/vge/if_vge.c
1668
htole32(htons(m_head->m_pkthdr.ether_vlantag) |
sys/dev/raid/ciss/ciss.c
2519
cbc->size = htons((u_int16_t)bufsize);
sys/dev/virtual/amazon/ena/ena.c
2673
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/virtual/amazon/ena/ena.c
2696
if ((ip->ip_off & htons(IP_DF)) != 0)
sys/dev/virtual/virtio/net/if_vtnet.c
1757
if (eh->ether_type == htons(ETHERTYPE_VLAN)) {
sys/dev/virtual/virtio/net/if_vtnet.c
2061
evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/dev/virtual/virtio/net/if_vtnet.c
2062
evl->evl_tag = htons(m->m_pkthdr.ether_vlantag);
sys/dev/virtual/vmware/vmxnet3/if_vmx.c
2747
if (evh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/net/altq/altq_red.c
477
ip->ip_sum = htons(~sum & 0xffff);
sys/net/altq/altq_subr.c
803
ip->ip_sum = htons(~sum & 0xffff);
sys/net/bridge/bridgestp.c
269
bpdu.cbu_protoid = htons(0);
sys/net/bridge/bridgestp.c
275
bpdu.cbu_rootpri = htons(cu->cu_rootid >> 48);
sys/net/bridge/bridgestp.c
285
bpdu.cbu_bridgepri = htons(cu->cu_bridge_id >> 48);
sys/net/bridge/bridgestp.c
293
bpdu.cbu_portid = htons(cu->cu_port_id);
sys/net/bridge/bridgestp.c
294
bpdu.cbu_messageage = htons(cu->cu_message_age);
sys/net/bridge/bridgestp.c
295
bpdu.cbu_maxage = htons(cu->cu_max_age);
sys/net/bridge/bridgestp.c
296
bpdu.cbu_hellotime = htons(cu->cu_hello_time);
sys/net/bridge/bridgestp.c
297
bpdu.cbu_forwarddelay = htons(cu->cu_forward_delay);
sys/net/bridge/bridgestp.c
305
eh->ether_type = htons(sizeof(bpdu));
sys/net/bridge/bridgestp.c
455
eh->ether_type = htons(sizeof(bpdu));
sys/net/bridge/if_bridge.c
4008
ether_type = htons(llc2->llc_un.type_snap.ether_type);
sys/net/gre/if_gre.c
316
if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/net/gre/if_gre.c
339
mob_h.proto = htons(mob_h.proto);
sys/net/gre/if_gre.c
368
ip->ip_len = htons(ntohs(ip->ip_len) + msiz);
sys/net/gre/if_gre.c
402
gh->gi_ptype = htons(etype);
sys/net/gre/if_gre.c
413
gh->gi_len = htons(m->m_pkthdr.len);
sys/net/if_ethersubr.c
255
eh->ether_type = htons(ETHERTYPE_MPLS);
sys/net/if_ethersubr.c
258
eh->ether_type = htons(ETHERTYPE_IP);
sys/net/if_ethersubr.c
265
ah->ar_hrd = htons(ARPHRD_ETHER);
sys/net/if_ethersubr.c
272
eh->ether_type = htons(ETHERTYPE_REVARP);
sys/net/if_ethersubr.c
277
eh->ether_type = htons(ETHERTYPE_ARP);
sys/net/if_ethersubr.c
292
eh->ether_type = htons(ETHERTYPE_IPV6);
sys/net/ip6fw/ip6_fw.c
722
*cookie = htons(f->fw_divert_port);
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
2977
ip_outer->ip_len = htons(len +
sys/net/ip_mroute/ip_mroute.c
2987
if (ip->ip_off & htons(IP_DF))
sys/net/ip_mroute/ip_mroute.c
2988
ip_outer->ip_off |= htons(IP_DF);
sys/net/ipfw/ip_fw2.c
2904
tcp->th_sport = htons(id->dst_port);
sys/net/ipfw/ip_fw2.c
2905
tcp->th_dport = htons(id->src_port);
sys/net/ipfw/ip_fw2.c
2931
tcp->th_dport = htons(id->dst_port);
sys/net/ipfw/ip_fw2.c
2932
tcp->th_sport = htons(id->src_port);
sys/net/ipfw/ip_fw2.c
2944
ip->ip_len = htons(sizeof(struct tcphdr));
sys/net/ipfw/ip_fw2.c
2951
ip->ip_len = htons(m->m_pkthdr.len);
sys/net/ipfw/ip_fw2.c
3047
dst_ip, htons(fid->dst_port),
sys/net/ipfw/ip_fw2.c
3048
src_ip, htons(fid->src_port),
sys/net/ipfw/ip_fw2.c
3052
src_ip, htons(fid->src_port),
sys/net/ipfw/ip_fw2.c
3053
dst_ip, htons(fid->dst_port),
sys/net/ipfw/ip_fw2.c
3188
htons(dlen + ip->ip_p));
sys/net/ipfw/ip_fw2.c
4017
(ip->ip_off & htons(IP_MF | IP_OFFMASK)) ||
sys/net/ipfw/ip_fw2.c
4131
(ip->ip_off & htons(IP_MF | IP_OFFMASK)) ||
sys/net/ipfw/ip_fw2.c
4230
(ip->ip_off & htons(IP_MF | IP_OFFMASK)) == 0)
sys/net/ipfw/ip_fw2.c
4251
ip->ip_len = htons(ntohs(ip->ip_len) + hlen);
sys/net/ipfw3_basic/ip_fw3_sync.c
200
sin.sin_port = htons(fw3_sync_ctx.edge_port);
sys/net/ipfw3_basic/ip_fw3_sync.c
246
sin.sin_port = htons(fw3_sync_ctx.edge_port);
sys/net/ipfw3_basic/ip_fw3_sync.c
291
sin.sin_port = htons(edge->port);
sys/net/ipfw3_layer4/ip_fw3_layer4.c
121
dst_ip, htons(fid->dst_port),
sys/net/ipfw3_layer4/ip_fw3_layer4.c
122
src_ip, htons(fid->src_port),
sys/net/ipfw3_layer4/ip_fw3_layer4.c
126
src_ip, htons(fid->src_port),
sys/net/ipfw3_layer4/ip_fw3_layer4.c
127
dst_ip, htons(fid->dst_port),
sys/net/ipfw3_nat/ip_fw3_nat.c
310
s->alias_port = htons(s->src_addr *
sys/net/ipfw3_nat/ip_fw3_nat.c
374
ip->ip_dst.s_addr, htons(dlen + ip->ip_p));
sys/net/ipfw3_nat/ip_fw3_nat.c
399
s2->src_port = htons(args->f_id.src_port);
sys/net/ipfw3_nat/ip_fw3_nat.c
419
s2->src_port = htons(args->f_id.src_port);
sys/net/ipfw3_nat/ip_fw3_nat.c
439
s->alias_port = htons(krandom() % ALIAS_RANGE + ALIAS_BEGIN);
sys/net/lagg/ieee8023ad_lacp.c
1200
return (htons(key));
sys/net/lagg/ieee8023ad_lacp.c
333
info->lip_systemid.lsi_prio = htons(LACP_SYSTEM_PRIO);
sys/net/lagg/ieee8023ad_lacp.c
336
info->lip_portid.lpi_prio = htons(LACP_PORT_PRIO);
sys/net/lagg/ieee8023ad_lacp.c
337
info->lip_portid.lpi_portno = htons(lp->lp_ifp->if_index);
sys/net/lagg/ieee8023ad_lacp.c
347
info->mi_rq_port = htons(ifp->if_index);
sys/net/lagg/ieee8023ad_lacp.c
374
du->ldu_eh.ether_type = htons(ETHERTYPE_SLOW);
sys/net/lagg/ieee8023ad_lacp.c
428
mdu->mdu_eh.ether_type = htons(ETHERTYPE_SLOW);
sys/net/pf/if_pfsync.c
1724
ip->ip_len = htons(m->m_pkthdr.len);
sys/net/pf/if_pfsync.c
1725
ip->ip_id = htons(ip_randomid());
sys/net/pf/if_pfsync.c
1726
ip->ip_off = htons(IP_DF);
sys/net/pf/pf.c
2200
h->ip_len = htons(tlen);
sys/net/pf/pf.c
2213
h6->ip6_plen = htons(tlen);
sys/net/pf/pf.c
2229
th->th_win = htons(win);
sys/net/pf/pf.c
2235
mss = htons(mss);
sys/net/pf/pf.c
2249
h->ip_len = htons(len);
sys/net/pf/pf.c
2250
h->ip_off = path_mtu_discovery ? htons(IP_DF) : 0;
sys/net/pf/pf.c
2995
key.port[1] = htons(low);
sys/net/pf/pf.c
2997
*nport = htons(low);
sys/net/pf/pf.c
3016
key.port[1] = htons(tmp);
sys/net/pf/pf.c
3029
*nport = htons(tmp);
sys/net/pf/pf.c
3034
key.port[1] = htons(tmp);
sys/net/pf/pf.c
3047
*nport = htons(tmp);
sys/net/pf/pf.c
3315
*nport = htons((u_int16_t)tmp_nport);
sys/net/pf/pf.c
3317
*nport = htons(r->rpool.proxy_port[0]);
sys/net/pf/pf.c
5322
if (h2.ip_off & htons(IP_OFFMASK)) {
sys/net/pf/pf.c
6163
(ip->ip_off & htons(IP_DF)) == 0)) {
sys/net/pf/pf.c
6184
if (ip->ip_off & htons(IP_DF)) {
sys/net/pf/pf.c
6335
dst->sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/net/pf/pf.c
6606
if (h->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/net/pf/pf.c
6921
if (htons(h->ip6_plen) == 0) {
sys/net/pf/pf_ioctl.c
796
(stor) = htons((st)->elm); \
sys/net/pf/pf_norm.c
1027
if (h->ip_off & ~htons(IP_DF)) {
sys/net/pf/pf_norm.c
1030
h->ip_off &= htons(IP_DF);
sys/net/pf/pf_norm.c
1943
*mss, htons(r->max_mss), 0);
sys/net/pf/pf_norm.c
1944
*mss = htons(r->max_mss);
sys/net/pf/pf_norm.c
412
ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
sys/net/pf/pf_norm.c
415
ip->ip_len = htons(ip_len + hlen);
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
520
ip->ip_len = htons(off + hlen);
sys/net/pf/pf_norm.c
521
ip->ip_off &= htons(IP_DF);
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
747
h->ip_len = htons(ntohs(h->ip_len) - aftercut);
sys/net/pf/pf_norm.c
869
int mff = (h->ip_off & htons(IP_MF));
sys/net/pf/pf_norm.c
917
if ((r->rule_flag & PFRULE_NODF) && (h->ip_off & htons(IP_DF))) {
sys/net/pf/pf_norm.c
920
h->ip_off &= ~htons(IP_DF);
sys/net/pf/pf_norm.c
935
if (h->ip_off & htons(IP_DF)) {
sys/net/pf/pf_osfp.c
128
if ((ip->ip_off & htons(IP_OFFMASK)) != 0)
sys/net/pf/pf_osfp.c
141
if (ip->ip_off & htons(IP_DF))
sys/net/pf/pfvar.h
228
#define HTONS(x) (x) = htons((__uint16_t)(x))
sys/net/pf/pfvar.h
941
(d)->max_win = htons((s)->max_win); \
sys/net/pf/pfvar.h
942
(d)->mss = htons((s)->mss); \
sys/net/pf/pfvar.h
947
htons((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
135
(f) = htons((cp[1] << 8) | cp[2]); \
sys/net/ppp_layer/slcompress.c
138
(f) = htons((u_int32_t)*cp++); \
sys/net/ppp_layer/slcompress.c
172
if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40)
sys/net/ppp_layer/slcompress.c
524
th->th_sum = htons((*cp << 8) | cp[1]);
sys/net/ppp_layer/slcompress.c
563
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
sys/net/ppp_layer/slcompress.c
578
cs->cs_ip.ip_len = htons(total_len);
sys/net/sppp/if_spppsubr.c
1293
h->protocol = htons (CISCO_KEEPALIVE);
sys/net/sppp/if_spppsubr.c
1301
ch->time0 = htons ((u_short) (tv.tv_sec >> 16));
sys/net/sppp/if_spppsubr.c
1302
ch->time1 = htons ((u_short) tv.tv_sec);
sys/net/sppp/if_spppsubr.c
1349
h->protocol = htons (proto); /* Link Control Protocol */
sys/net/sppp/if_spppsubr.c
1354
lh->len = htons (LCP_HEADER_LEN + len);
sys/net/sppp/if_spppsubr.c
3451
desiredaddr.s6_addr16[0] = htons(0xfe80);
sys/net/sppp/if_spppsubr.c
3452
desiredaddr.s6_addr16[1] = htons(sp->pp_if.if_index);
sys/net/sppp/if_spppsubr.c
3607
suggestaddr.s6_addr16[0] = htons(0xfe80);
sys/net/sppp/if_spppsubr.c
3608
suggestaddr.s6_addr16[1] = htons(sp->pp_if.if_index);
sys/net/sppp/if_spppsubr.c
4643
h->protocol = htons(cp->proto);
sys/net/sppp/if_spppsubr.c
4668
lh->len = htons (LCP_HEADER_LEN + len);
sys/net/sppp/if_spppsubr.c
824
h->protocol = htons (ETHERTYPE_IP);
sys/net/sppp/if_spppsubr.c
835
h->protocol = htons(ipproto);
sys/net/sppp/if_spppsubr.c
844
h->protocol = htons (ETHERTYPE_IPV6);
sys/net/sppp/if_spppsubr.c
855
h->protocol = htons(PPP_IPV6);
sys/net/stf/if_stf.c
408
ip->ip_len = htons(m->m_pkthdr.len); /* network order */
sys/net/vlan/if_vlan_ether.c
102
evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/net/vlan/if_vlan_ether.c
103
evl->evl_tag = htons(vlantag);
sys/net/vlan/if_vlan_ether.c
127
evh.evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/net/vlan/if_vlan_ether.c
128
evh.evl_tag = htons(vlantag);
sys/net/wg/if_wg.c
1005
sin.sin_port = htons(*port);
sys/net/wg/if_wg.c
1012
sin6.sin6_port = htons(*port);
sys/netgraph/cisco/ng_cisco.c
374
h->protocol = htons(ETHERTYPE_IP);
sys/netgraph/cisco/ng_cisco.c
377
h->protocol = htons(ETHERTYPE_IPV6);
sys/netgraph/cisco/ng_cisco.c
380
h->protocol = htons(ETHERTYPE_IPX);
sys/netgraph/cisco/ng_cisco.c
611
h->protocol = htons(CISCO_KEEPALIVE);
sys/netgraph/cisco/ng_cisco.c
618
ch->time0 = htons((u_short) (t >> 16));
sys/netgraph/cisco/ng_cisco.c
619
ch->time1 = htons((u_short) t);
sys/netgraph/etf/ng_etf.c
318
htons(f->ethertype))) {
sys/netgraph/etf/ng_etf.c
334
fil->ethertype = htons(f->ethertype);
sys/netgraph/ksocket/ng_ksocket.c
289
sin->sin_port = htons(val);
sys/netgraph/l2tp/ng_l2tp.c
1405
mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR);
sys/netgraph/l2tp/ng_l2tp.c
1406
mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len);
sys/netgraph/l2tp/ng_l2tp.c
1409
mtod(m, u_int16_t *)[4] = htons(ns);
sys/netgraph/l2tp/ng_l2tp.c
1410
mtod(m, u_int16_t *)[5] = htons(seq->nr);
sys/netgraph/l2tp/ng_l2tp.c
384
hpriv->conf.session_id = htons(session_id);
sys/netgraph/l2tp/ng_l2tp.c
420
conf->tunnel_id = htons(conf->tunnel_id);
sys/netgraph/l2tp/ng_l2tp.c
421
conf->peer_id = htons(conf->peer_id);
sys/netgraph/l2tp/ng_l2tp.c
481
conf->session_id = htons(conf->session_id);
sys/netgraph/l2tp/ng_l2tp.c
482
conf->peer_id = htons(conf->peer_id);
sys/netgraph/l2tp/ng_l2tp.c
513
session_id = htons(session_id);
sys/netgraph/l2tp/ng_l2tp.c
981
mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len);
sys/netgraph/l2tp/ng_l2tp.c
987
mtod(m, u_int16_t *)[i++] = htons(hpriv->ns);
sys/netgraph/l2tp/ng_l2tp.c
988
mtod(m, u_int16_t *)[i++] = htons(hpriv->nr);
sys/netgraph/l2tp/ng_l2tp.c
991
mtod(m, u_int16_t *)[0] = htons(hdr);
sys/netgraph/mppc/ng_mppc.c
565
*((u_int16_t *)outbuf) = htons(header);
sys/netgraph/ppp/ng_ppp.c
1568
shdr = htons(shdr);
sys/netgraph/ppp/ng_ppp.c
1854
u_int16_t pword = htons((u_int16_t)proto);
sys/netgraph/ppp/ng_ppp.c
918
hdr[0] = htons(linkNum);
sys/netgraph/ppp/ng_ppp.c
919
hdr[1] = htons((u_int16_t)proto);
sys/netgraph/pppoe/ng_pppoe.c
1095
htons(sp->Session_ID
sys/netgraph/pppoe/ng_pppoe.c
1286
sp->pkt_hdr.ph.length = htons((short)(m->m_pkthdr.len));
sys/netgraph/pppoe/ng_pppoe.c
1336
uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(sp));
sys/netgraph/pppoe/ng_pppoe.c
1476
tag->tag_len = htons((u_int16_t)msglen);
sys/netgraph/pppoe/ng_pppoe.c
1480
wh->ph.length = htons(sizeof(*tag) + msglen);
sys/netgraph/pppoe/ng_pppoe.c
380
wh->ph.length = htons(length);
sys/netgraph/pppoe/ng_pppoe.c
715
htons((u_int16_t)ourmsg->data_len);
sys/netgraph/pppoe/ng_pppoe.c
733
htons((u_int16_t)ourmsg->data_len);
sys/netgraph/pppoe/ng_pppoe.c
755
htons((u_int16_t)ourmsg->data_len);
sys/netgraph/pppoe/ng_pppoe.c
780
htons((u_int16_t)ourmsg->data_len);
sys/netgraph/pppoe/ng_pppoe.c
828
uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(uniqtag.data));
sys/netgraph/pptpgre/ng_pptpgre.c
508
gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0;
sys/netgraph/pptpgre/ng_pptpgre.c
509
gre->cid = htons(priv->conf.peerCid);
sys/netgraph7/cisco/ng_cisco.c
366
h->protocol = htons(ETHERTYPE_IP);
sys/netgraph7/cisco/ng_cisco.c
369
h->protocol = htons(ETHERTYPE_IPV6);
sys/netgraph7/cisco/ng_cisco.c
372
h->protocol = htons(ETHERTYPE_IPX);
sys/netgraph7/cisco/ng_cisco.c
607
h->protocol = htons(CISCO_KEEPALIVE);
sys/netgraph7/cisco/ng_cisco.c
614
ch->time0 = htons((u_short) (t >> 16));
sys/netgraph7/cisco/ng_cisco.c
615
ch->time1 = htons((u_short) t);
sys/netgraph7/deflate/ng_deflate.c
503
((u_int16_t *)priv->outbuf)[0] = htons(PROT_COMPD);
sys/netgraph7/deflate/ng_deflate.c
504
((u_int16_t *)priv->outbuf)[1] = htons(priv->seqnum);
sys/netgraph7/etf/ng_etf.c
312
htons(f->ethertype))) {
sys/netgraph7/etf/ng_etf.c
329
fil->ethertype = htons(f->ethertype);
sys/netgraph7/ksocket/ng_ksocket.c
291
sin->sin_port = htons(val);
sys/netgraph7/l2tp/ng_l2tp.c
1156
mtod(m, u_int16_t *)[i++] = htons(m->m_pkthdr.len);
sys/netgraph7/l2tp/ng_l2tp.c
1162
mtod(m, u_int16_t *)[i++] = htons(hpriv->ns);
sys/netgraph7/l2tp/ng_l2tp.c
1163
mtod(m, u_int16_t *)[i++] = htons(hpriv->nr);
sys/netgraph7/l2tp/ng_l2tp.c
1166
mtod(m, u_int16_t *)[0] = htons(hdr);
sys/netgraph7/l2tp/ng_l2tp.c
1565
mtod(m, u_int16_t *)[0] = htons(L2TP_CTRL_HDR);
sys/netgraph7/l2tp/ng_l2tp.c
1566
mtod(m, u_int16_t *)[1] = htons(m->m_pkthdr.len);
sys/netgraph7/l2tp/ng_l2tp.c
1569
mtod(m, u_int16_t *)[4] = htons(ns);
sys/netgraph7/l2tp/ng_l2tp.c
1570
mtod(m, u_int16_t *)[5] = htons(seq->nr);
sys/netgraph7/l2tp/ng_l2tp.c
433
hpriv->conf.session_id = htons(session_id);
sys/netgraph7/l2tp/ng_l2tp.c
473
conf->tunnel_id = htons(conf->tunnel_id);
sys/netgraph7/l2tp/ng_l2tp.c
474
conf->peer_id = htons(conf->peer_id);
sys/netgraph7/l2tp/ng_l2tp.c
525
conf->session_id = htons(conf->session_id);
sys/netgraph7/l2tp/ng_l2tp.c
526
conf->peer_id = htons(conf->peer_id);
sys/netgraph7/l2tp/ng_l2tp.c
551
session_id = htons(session_id);
sys/netgraph7/l2tp/ng_l2tp.c
605
session_id = htons(session_id);
sys/netgraph7/l2tp/ng_l2tp.c
638
conf->ns = htons(conf->ns);
sys/netgraph7/l2tp/ng_l2tp.c
639
conf->nr = htons(conf->nr);
sys/netgraph7/l2tp/ng_l2tp.c
640
conf->rack = htons(conf->rack);
sys/netgraph7/l2tp/ng_l2tp.c
641
conf->xack = htons(conf->xack);
sys/netgraph7/mppc/ng_mppc.c
586
*(mtod(m, uint16_t *)) = htons(header);
sys/netgraph7/netflow/netflow.c
168
dgram->header.version = htons(NETFLOW_V5);
sys/netgraph7/netflow/netflow.c
433
if ((ip->ip_off & htons(IP_OFFMASK)) == 0)
sys/netgraph7/netflow/netflow.c
604
header->count = htons(header->count);
sys/netgraph7/netflow/netflow.c
61
htons(addr2 ^ (addr2 >> 16))) ^ \
sys/netgraph7/netflow/netflow.c
62
port1 ^ htons(port2)) & \
sys/netgraph7/netflow/netflow.c
634
rec->i_ifx = htons(fle->f.fle_i_ifx);
sys/netgraph7/netflow/netflow.c
635
rec->o_ifx = htons(fle->f.fle_o_ifx);
sys/netgraph7/netflow/netflow.c
68
htons(addr2 ^ (addr2 >> 16))) & \
sys/netgraph7/netflow/ng_netflow.c
544
if ((ip->ip_off & htons(IP_OFFMASK)) == 0) {
sys/netgraph7/ng_nat.c
404
rp->local_addr, htons(rp->local_port),
sys/netgraph7/ng_nat.c
405
rp->remote_addr, htons(rp->remote_port),
sys/netgraph7/ng_nat.c
406
rp->alias_addr, htons(rp->alias_port),
sys/netgraph7/ng_nat.c
613
as->addr, htons(as->port)) == -1) {
sys/netgraph7/ng_nat.c
724
if ((ip->ip_off & htons(IP_OFFMASK)) == 0 &&
sys/netgraph7/ng_nat.c
754
ip->ip_dst.s_addr, htons(IPPROTO_TCP +
sys/netgraph7/ng_pred1.c
408
lenn = htons(inlen & 0x7FFF);
sys/netgraph7/ng_pred1.c
507
lenn = htons(len);
sys/netgraph7/ng_vlan.c
366
eh->ether_type == htons(ETHERTYPE_VLAN)) {
sys/netgraph7/ng_vlan.c
428
evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/netgraph7/ng_vlan.c
429
evl->evl_tag = htons(f->vlan);
sys/netgraph7/ppp/ng_ppp.c
2105
shdr = htons(shdr);
sys/netgraph7/ppp/ng_ppp.c
2398
uint16_t pword = htons(proto);
sys/netgraph7/ppp/ng_ppp.c
893
hdr[0] = htons(linkNum);
sys/netgraph7/ppp/ng_ppp.c
894
hdr[1] = htons(proto);
sys/netgraph7/pppoe/ng_pppoe.c
1070
uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(uniqtag.data));
sys/netgraph7/pppoe/ng_pppoe.c
1171
wh->ph.length = htons(m->m_pkthdr.len - sizeof(*wh));
sys/netgraph7/pppoe/ng_pppoe.c
1227
uniqtag.hdr.tag_len = htons((u_int16_t)sizeof(sp));
sys/netgraph7/pppoe/ng_pppoe.c
1439
if (neg->ac_name_len != htons(tag->tag_len) ||
sys/netgraph7/pppoe/ng_pppoe.c
1514
htons(pppoe_getnewsession(sp));
sys/netgraph7/pppoe/ng_pppoe.c
1771
tag->tag_len = htons((u_int16_t)msglen);
sys/netgraph7/pppoe/ng_pppoe.c
1775
wh->ph.length = htons(sizeof(*tag) + msglen);
sys/netgraph7/pppoe/ng_pppoe.c
397
wh->ph.length = htons(length);
sys/netgraph7/pppoe/ng_pppoe.c
863
neg->service.hdr.tag_len = htons((uint16_t)srvlen);
sys/netgraph7/pppoe/ng_pppoe.c
880
htons((uint16_t)ourmsg->data_len);
sys/netgraph7/pppoe/ng_pppoe.c
902
htons((uint16_t)ourmsg->data_len);
sys/netgraph7/pppoe/ng_pppoe.c
927
htons((uint16_t)ourmsg->data_len);
sys/netgraph7/pptpgre/ng_pptpgre.c
576
gre->length = (m != NULL) ? htons((u_short)m->m_pkthdr.len) : 0;
sys/netgraph7/pptpgre/ng_pptpgre.c
577
gre->cid = htons(hpriv->conf.peerCid);
sys/netgraph7/rfc1490/ng_rfc1490.c
419
= htons(ETHERTYPE_IP); /* PID */
sys/netgraph7/rfc1490/ng_rfc1490.c
425
*((u_int16_t *)mtod(m, u_int16_t *)) = htons(ETHERTYPE_IP);
sys/netgraph7/tcpmss/ng_tcpmss.c
435
*mss = htons(maxmss);
sys/netinet/if_ether.c
1243
ah->ar_op = htons(ARPOP_REPLY);
sys/netinet/if_ether.c
1244
ah->ar_pro = htons(ETHERTYPE_IP); /* let's be sure! */
sys/netinet/if_ether.c
1254
eh->ether_type = htons(ETHERTYPE_ARP);
sys/netinet/if_ether.c
370
ar_hrd = htons(ARPHRD_ETHER);
sys/netinet/if_ether.c
381
ah->ar_pro = htons(ETHERTYPE_IP);
sys/netinet/if_ether.c
384
ah->ar_op = htons(ARPOP_REQUEST);
sys/netinet/if_ether.c
410
eh->ether_type = htons(ETHERTYPE_ARP);
sys/netinet/igmp.c
522
ip->ip_len = htons(sizeof(struct ip) + IGMP_MINLEN);
sys/netinet/in_cksum.c
91
ipov.ih_len = htons(bytes);
sys/netinet/in_gif.c
167
iphdr.ip_len = htons(m->m_pkthdr.len + sizeof(struct ip));
sys/netinet/in_pcb.c
442
if (in_pcbporthash_update(portinfo, inp, htons(lport),
sys/netinet/in_pcb.c
902
lport_no = htons(lport);
sys/netinet/ip_carp.c
1378
ip->ip_len = htons(len);
sys/netinet/ip_carp.c
1380
ip->ip_off = htons(IP_DF);
sys/netinet/ip_carp.c
1450
ip6->ip6_dst.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_carp.c
2197
in6.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_carp.c
2207
in6.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_demux.c
205
if (ip->ip_off & htons(IP_OFFMASK))
sys/netinet/ip_demux.c
304
if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/netinet/ip_divert.c
227
nport = htons((u_int16_t)port);
sys/netinet/ip_divert.c
570
if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/netinet/ip_divert.c
607
ip->ip_len = htons(ntohs(ip->ip_len) + hlen);
sys/netinet/ip_flow.c
257
if (ip->ip_sum >= (uint16_t)~htons(IPTTLDEC << 8))
sys/netinet/ip_flow.c
258
ip->ip_sum -= ~htons(IPTTLDEC << 8);
sys/netinet/ip_flow.c
260
ip->ip_sum += htons(IPTTLDEC << 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
167
if (oip->ip_off & htons(~(IP_MF|IP_DF)))
sys/netinet/ip_icmp.c
207
icp->icmp_nextmtu = htons(destmtu);
sys/netinet/ip_icmp.c
227
nip->ip_len = htons(m->m_len);
sys/netinet/ip_input.c
1051
if (ip->ip_off & htons(IP_MF)) {
sys/netinet/ip_input.c
1173
ip->ip_off = htons(ip_off >> 3);
sys/netinet/ip_input.c
1174
ip->ip_len = htons(ip_len + hlen);
sys/netinet/ip_input.c
1205
GETIP(q)->ip_len = htons(fp_len - i + fp_hlen);
sys/netinet/ip_input.c
1206
GETIP(q)->ip_off = htons((fp_off + i) >> 3);
sys/netinet/ip_input.c
1307
ip->ip_len = htons(next + hlen);
sys/netinet/ip_input.c
1310
ip->ip_off &= htons(IP_DF);
sys/netinet/ip_input.c
1958
ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
sys/netinet/ip_input.c
480
(ip->ip_off & htons(IP_MF | IP_OFFMASK)))
sys/netinet/ip_input.c
850
if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/netinet/ip_output.c
1001
ip->ip_len = htons(ntohs( ip->ip_len) + optlen);
sys/netinet/ip_output.c
261
ip->ip_off &= htons(IP_DF);
sys/netinet/ip_output.c
262
if (ip_do_rfc6864 && (ip->ip_off & htons(IP_DF)))
sys/netinet/ip_output.c
657
!(ip->ip_off & htons(IP_DF))) ||
sys/netinet/ip_output.c
703
if (ip->ip_off & htons(IP_DF)) {
sys/netinet/ip_output.c
785
if (ip->ip_off & htons(IP_DF)) { /* Fragmentation not allowed */
sys/netinet/ip_output.c
879
mhip->ip_off = htons(((off - hlen) >> 3) + ntohs(ip->ip_off));
sys/netinet/ip_output.c
884
mhip->ip_off |= htons(IP_MF);
sys/netinet/ip_output.c
886
mhip->ip_len = htons((u_short)(len + mhlen));
sys/netinet/ip_output.c
916
ip->ip_len = htons((u_short)m0->m_pkthdr.len);
sys/netinet/ip_output.c
917
ip->ip_off |= htons(IP_MF);
sys/netinet/raw_ip.c
248
ip->ip_len = htons(m->m_pkthdr.len); /* incls header now */
sys/netinet/tcp_input.c
747
ipov->ih_len = htons(ipov->ih_len);
sys/netinet/tcp_input.c
843
htons(next_hop->sin_port) :
sys/netinet/tcp_output.c
1036
th->th_win = htons((u_short) (recvwin>>tp->rcv_scale));
sys/netinet/tcp_output.c
1041
th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));
sys/netinet/tcp_output.c
1086
htons((u_short)(optlen + len)));
sys/netinet/tcp_output.c
1230
ip->ip_len = htons(m->m_pkthdr.len);
sys/netinet/tcp_output.c
1245
ip->ip_off |= htons(IP_DF);
sys/netinet/tcp_output.c
726
mss = htons((u_short) tcp_mssopt(tp));
sys/netinet/tcp_subr.c
2273
ippseudo.ippseudo_len = htons(len + sizeof(struct tcphdr) + optlen);
sys/netinet/tcp_subr.c
501
plen = htons(IPPROTO_TCP);
sys/netinet/tcp_subr.c
503
plen = htons(sizeof(struct tcphdr) + IPPROTO_TCP);
sys/netinet/tcp_subr.c
654
ip6->ip6_plen = htons((u_short)(sizeof(struct tcphdr) + tlen));
sys/netinet/tcp_subr.c
658
ip->ip_len = htons(tlen);
sys/netinet/tcp_subr.c
670
nth->th_win = htons((u_short) (win >> tp->rcv_scale));
sys/netinet/tcp_subr.c
672
nth->th_win = htons((u_short)win);
sys/netinet/tcp_subr.c
683
htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p)));
sys/netinet/tcp_syncache.c
1207
ip6->ip6_plen = htons(tlen - hlen);
sys/netinet/tcp_syncache.c
1216
ip->ip_len = htons(tlen);
sys/netinet/tcp_syncache.c
1236
ip->ip_off |= htons(IP_DF);
sys/netinet/tcp_syncache.c
1249
th->th_win = htons(sc->sc_wnd);
sys/netinet/tcp_syncache.c
1315
htons(tlen - hlen + IPPROTO_TCP));
sys/netinet/udp_usrreq.c
1096
ui->ui_ulen = htons((u_short)len + sizeof(struct udphdr));
sys/netinet/udp_usrreq.c
1103
htons((u_short)len + sizeof(struct udphdr) + IPPROTO_UDP));
sys/netinet/udp_usrreq.c
1110
((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len);
sys/netinet6/frag6.c
470
ip6->ip6_plen = htons((u_short)next + offset - sizeof(struct ip6_hdr));
sys/netinet6/icmp6.c
1075
htons(m->m_pkthdr.rcvif->if_index);
sys/netinet6/icmp6.c
1349
nni6->ni_flags = htons(0x0000); /* raw bitmap */
sys/netinet6/icmp6.c
2200
redtgt6.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/icmp6.c
2202
reddst6.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/icmp6.c
2608
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
sys/netinet6/in6.c
1111
llsol.s6_addr16[0] = htons(0xff02);
sys/netinet6/in6.c
1112
llsol.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6.c
1142
mltaddr.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6.c
1273
llsol.s6_addr16[0] = htons(0xff02);
sys/netinet6/in6.c
1274
llsol.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6.c
564
htons(ifp->if_index);
sys/netinet6/in6.c
566
htons(ifp->if_index)) {
sys/netinet6/in6_gif.c
169
ip6->ip6_plen = htons((u_short)m->m_pkthdr.len);
sys/netinet6/in6_ifattach.c
418
ifra.ifra_addr.sin6_addr.s6_addr16[0] = htons(0xfe80);
sys/netinet6/in6_ifattach.c
419
ifra.ifra_addr.sin6_addr.s6_addr16[1] = htons(ifp->if_index); /* XXX */
sys/netinet6/in6_ifattach.c
621
in6->s6_addr16[0] = htons(0xff02);
sys/netinet6/in6_ifattach.c
623
in6->s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6_ifattach.c
656
mltaddr.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6_ifattach.c
703
mltaddr.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6_ifattach.c
843
sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6_src.c
490
if (in6_pcbporthash_update(portinfo, inp, htons(lport),
sys/netinet6/in6_src.c
569
in6->s6_addr16[1] = htons(pi->ipi6_ifindex);
sys/netinet6/in6_src.c
574
in6->s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/in6_src.c
581
in6->s6_addr16[1] = htons(scopeid & 0xffff);
sys/netinet6/ip6_input.c
397
= htons(m->m_pkthdr.rcvif->if_index);
sys/netinet6/ip6_input.c
400
= htons(m->m_pkthdr.rcvif->if_index);
sys/netinet6/ip6_output.c
226
ip6->ip6_plen = htons(plen);
sys/netinet6/ip6_output.c
2372
= htons(mreq->ipv6mr_interface);
sys/netinet6/ip6_output.c
2435
= htons(mreq->ipv6mr_interface);
sys/netinet6/ip6_output.c
818
ip6f->ip6f_offlg = htons((u_short)((off - hlen) & ~7));
sys/netinet6/ip6_output.c
823
mhip6->ip6_plen = htons((u_short)(len + hlen +
sys/netinet6/mld6.c
118
u_int16_t rtalert_code = htons((u_int16_t)IP6OPT_RTALERT_MLD);
sys/netinet6/mld6.c
148
htons(in6m->in6m_ifp->if_index); /* XXX */
sys/netinet6/mld6.c
167
htons(in6m->in6m_ifp->if_index); /* XXX */
sys/netinet6/mld6.c
169
htons(in6m->in6m_ifp->if_index); /* XXX: necessary when mrouting */
sys/netinet6/mld6.c
243
htons(ifp->if_index); /* XXX */
sys/netinet6/mld6.c
270
htons(ifp->if_index); /* XXX */
sys/netinet6/mld6.c
349
htons(ifp->if_index); /* XXX */
sys/netinet6/nd6.c
1372
llsol.s6_addr16[0] = htons(0xff02);
sys/netinet6/nd6.c
1373
llsol.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6.c
1400
llsol.s6_addr16[0] = htons(0xff02);
sys/netinet6/nd6.c
1401
llsol.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6.c
1645
*idp = htons(ifp->if_index);
sys/netinet6/nd6_nbr.c
1039
ip6->ip6_plen = htons((u_short)icmp6len);
sys/netinet6/nd6_nbr.c
188
taddr6.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6_nbr.c
399
saddr6.s6_addr16[1] = htons(cmpifp->if_index);
sys/netinet6/nd6_nbr.c
492
ip6->ip6_dst.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6_nbr.c
577
ip6->ip6_plen = htons((u_short)icmp6len);
sys/netinet6/nd6_nbr.c
646
taddr6.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6_nbr.c
970
ip6->ip6_dst.s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/nd6_rtr.c
1809
gateway->s6_addr16[1] = htons(ifp->if_index);
sys/netinet6/raw_ip6.c
348
ip6->ip6_dst.s6_addr16[1] = htons(pi->ipi6_ifindex);
sys/netinet6/raw_ip6.c
354
ip6->ip6_dst.s6_addr16[1] = htons(oifp->if_index);
sys/netinet6/raw_ip6.c
363
htons(dstsock->sin6_scope_id & 0xffff); /* XXX */
sys/netinet6/scope6.c
413
in6->s6_addr16[1] = htons(zoneid & 0xffff); /* XXX */
sys/netinet6/udp6_output.c
230
udp6->uh_ulen = htons((u_short)plen);
sys/netinet6/udp6_output.c
240
ip6->ip6_plen = htons((u_short)plen);
sys/netproto/802_11/wlan/ieee80211_adhoc.c
553
if (eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_adhoc.c
569
eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_alq.c
151
r->r_wlan = htons(vap->iv_ifp->if_dunit);
sys/netproto/802_11/wlan/ieee80211_hostap.c
1587
eh->ether_type = htons(sizeof(*l2uf) - sizeof(*eh));
sys/netproto/802_11/wlan/ieee80211_hostap.c
776
if (eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_hostap.c
792
eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_input.c
337
!(llc->llc_snap.ether_type == htons(ETHERTYPE_AARP) ||
sys/netproto/802_11/wlan/ieee80211_input.c
338
llc->llc_snap.ether_type == htons(ETHERTYPE_IPX))) {
sys/netproto/802_11/wlan/ieee80211_input.c
372
eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));
sys/netproto/802_11/wlan/ieee80211_mesh.c
1308
!(llc->llc_snap.ether_type == htons(ETHERTYPE_AARP) ||
sys/netproto/802_11/wlan/ieee80211_mesh.c
1309
llc->llc_snap.ether_type == htons(ETHERTYPE_IPX))) {
sys/netproto/802_11/wlan/ieee80211_mesh.c
1357
eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));
sys/netproto/802_11/wlan/ieee80211_output.c
1101
if (eh->ether_type == htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_output.c
1144
if (eh->ether_type == htons(ETHERTYPE_IP)) {
sys/netproto/802_11/wlan/ieee80211_output.c
1157
if (eh->ether_type == htons(ETHERTYPE_IPV6)) {
sys/netproto/802_11/wlan/ieee80211_output.c
3653
mtod(m, struct ether_header *)->ether_type = htons(payload);
sys/netproto/802_11/wlan/ieee80211_output.c
379
htons(eh->ether_type));
sys/netproto/802_11/wlan/ieee80211_sta.c
829
if (eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_sta.c
845
eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_superg.c
287
if (llc->llc_snap.ether_type != htons(ATH_FF_ETH_TYPE))
sys/netproto/802_11/wlan/ieee80211_superg.c
458
llc->llc_snap.ether_type = htons(ATH_FF_ETH_TYPE);
sys/netproto/802_11/wlan/ieee80211_wds.c
637
if (eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/netproto/802_11/wlan/ieee80211_wds.c
653
eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/platform/pc64/x86_64/autoconf.c
379
nd->root_saddr.sin_port = htons(NFS_PORT);
sys/platform/vkernel64/x86_64/autoconf.c
473
nd->root_saddr.sin_port = htons(NFS_PORT);
sys/vfs/nfs/bootp_subr.c
1251
ifctx->call.flags = htons(0x8000); /* We need an broadcast answer */
sys/vfs/nfs/bootp_subr.c
641
sin->sin_port = htons(IPPORT_BOOTPC);
sys/vfs/nfs/bootp_subr.c
654
sin->sin_port = htons(IPPORT_BOOTPS);
sys/vfs/nfs/bootp_subr.c
817
ifctx->call.secs = htons(gctx->secs);
sys/vfs/nfs/krpc_subr.c
148
*portp = htons(PMAPPORT);
sys/vfs/nfs/krpc_subr.c
162
sin->sin_port = htons(PMAPPORT);
sys/vfs/nfs/krpc_subr.c
259
sin->sin_port = htons(tport);
sys/vfs/nfs/nfs_socket.c
232
sin->sin_port = htons(0);
test/mcast/mcast.c
48
in.sin_port = htons(atoi(optarg));
test/socket/accept/block/accept_block.c
41
in.sin_port = htons(port);
test/socket/accept/block/accept_block.c
88
in.sin_port = htons(port);
test/socket/accept/nonblock/accept_nblock.c
38
in.sin_port = htons(port);
test/socket/accept/nonblock/accept_nblock.c
87
in.sin_port = htons(port);
test/socket/accept4/block/accept4_block.c
41
in.sin_port = htons(port);
test/socket/accept4/block/accept4_block.c
97
in.sin_port = htons(port);
test/socket/accept4/cloexec/accept4_cloexec.c
35
in.sin_port = htons(port);
test/socket/accept4/cloexec/accept4_cloexec.c
79
in.sin_port = htons(port);
test/socket/accept4/nonblock/accept4_nblock.c
36
in.sin_port = htons(port);
test/socket/accept4/nonblock/accept4_nblock.c
79
in.sin_port = htons(port);
test/socket/socket/nonblock/socket_nblock.c
66
in.sin_port = htons(port);
test/stress/stress2/testcases/tcp/tcp.c
119
inetaddr.sin_port = htons(port);
test/stress/stress2/testcases/tcp/tcp.c
65
inetaddr.sin_port = htons(port);
test/stress/stress2/testcases/udp/udp.c
90
sock_in.sin_port = htons(9);
test/stress/webstress/webstress.c
258
node->url_sin.sin_port = htons(strtol(ptr, NULL, 0));
test/stress/webstress/webstress.c
260
node->url_sin.sin_port = htons(80);
test/udp/bindconnfail/udp_bindconnfail.c
43
local_in.sin_port = htons(local_in.sin_port);
test/udp/bindconnfail/udp_bindconnfail.c
53
in.sin_port = htons(in.sin_port);
test/udp/bindconnsend/udp_bindconnsend.c
45
local_in.sin_port = htons(local_in.sin_port);
test/udp/bindconnsend/udp_bindconnsend.c
55
in.sin_port = htons(in.sin_port);
test/udp/bindsend/udp_bindsend.c
45
local_in.sin_port = htons(local_in.sin_port);
test/udp/bindsend/udp_bindsend.c
55
in.sin_port = htons(in.sin_port);
test/udp/conn2send/udp_conn2send.c
43
in.sin_port = htons(in.sin_port);
test/udp/connsend/udp_connsend.c
40
in.sin_port = htons(in.sin_port);
test/udp/disconnsend/udp_disconnsend.c
40
in.sin_port = htons(in.sin_port);
test/udp/mcastbind/mcastbind.c
107
in.sin_port = htons(in.sin_port);
test/udp/mcastconn/mcastconn.c
69
remote_in.sin_port = htons(remote_in.sin_port);
test/udp/mcastconn/mcastconn.c
84
in.sin_port = htons(in.sin_port);
test/udp/mcastsend/mcastsend.c
50
local_in.sin_port = htons(local_in.sin_port);
test/udp/mcastsend/mcastsend.c
69
dst.sin_port = htons(dst.sin_port);
test/udp/sendsrcaddr/udp_sendsrcaddr.c
80
remote.sin_port = htons(remote.sin_port);
test/udp/sendwildcard/udp_sendwildcard.c
42
in.sin_port = htons(in.sin_port);
test/udp/tos/udp_tos.c
53
in.sin_port = htons(in.sin_port);
tools/regression/sockets/sigpipe/sigpipe.c
201
sin.sin_port = htons(port);
tools/regression/sockets/sigpipe/sigpipe.c
232
sin.sin_port = htons(port);
tools/tools/net80211/w00t/redir/buddy.c
130
s_in.sin_port = htons(666);
tools/tools/net80211/w00t/redir/buddy.c
83
id = htons(len);
tools/tools/net80211/w00t/redir/redir.c
298
ih->ip_len = htons(len);
tools/tools/net80211/w00t/redir/redir.c
299
ih->ip_id = htons(q->id);
tools/tools/net80211/w00t/redir/redir.c
431
s_in.sin_port = htons(p->port);
tools/tools/net80211/wesside/dics/dics.c
173
if ( htons(uh->uh_dport) != DPORT)
tools/tools/net80211/wesside/dics/dics.c
203
ph->ippseudo_len = htons(len);
tools/tools/net80211/wesside/dics/dics.c
241
iph->ip_len = htons(20+8+dlen);
tools/tools/net80211/wesside/dics/dics.c
242
iph->ip_id = htons(666);
tools/tools/net80211/wesside/dics/dics.c
253
dst.sin_port = htons(port);
tools/tools/net80211/wesside/dics/dics.c
259
uh->uh_sport = htons(DPORT);
tools/tools/net80211/wesside/dics/dics.c
260
uh->uh_dport = htons(port);
tools/tools/net80211/wesside/dics/dics.c
261
uh->uh_ulen = htons(8+dlen);
tools/tools/net80211/wesside/dics/dics.c
343
s_in.sin_port = htons(DPORT);
tools/tools/net80211/wesside/udps/udps.c
147
s_in.sin_port = htons(port);
tools/tools/net80211/wesside/wesside/wesside.c
1178
h->ar_hrd = htons(ARPHRD_ETHER);
tools/tools/net80211/wesside/wesside/wesside.c
1179
h->ar_pro = htons(ETHERTYPE_IP);
tools/tools/net80211/wesside/wesside/wesside.c
1182
h->ar_op = htons(ARPOP_REQUEST);
tools/tools/net80211/wesside/wesside/wesside.c
1376
unsigned short iplen = htons(len - 8);
tools/tools/net80211/wesside/wesside/wesside.c
1677
h->ar_hrd = htons(ARPHRD_ETHER);
tools/tools/net80211/wesside/wesside/wesside.c
1678
h->ar_pro = htons(ETHERTYPE_IP);
tools/tools/net80211/wesside/wesside/wesside.c
1681
h->ar_op = htons(op);
tools/tools/net80211/wesside/wesside/wesside.c
1905
ih->ip_len = htons(20+8+5);
tools/tools/net80211/wesside/wesside/wesside.c
1906
ih->ip_id = htons(666);
tools/tools/net80211/wesside/wesside/wesside.c
1919
uh->uh_sport = htons(floodsport);
tools/tools/net80211/wesside/wesside/wesside.c
1920
uh->uh_dport = htons(floodport);
tools/tools/net80211/wesside/wesside/wesside.c
1921
uh->uh_ulen = htons(8+5);
tools/tools/net80211/wesside/wesside/wesside.c
235
ph->ippseudo_len = htons(len);
tools/tools/net80211/wesside/wesside/wesside.c
783
h->llc_un.type_snap.ether_type = htons(type);
tools/tools/net80211/wesside/wesside/wesside.c
801
ih->ip_len = htons(20+8+PRGA_LEN);
tools/tools/net80211/wesside/wesside/wesside.c
802
ih->ip_id = htons(666);
tools/tools/net80211/wesside/wesside/wesside.c
812
uh->uh_sport = htons(floodport);
tools/tools/net80211/wesside/wesside/wesside.c
813
uh->uh_dport = htons(floodsport);
tools/tools/net80211/wesside/wesside/wesside.c
814
uh->uh_ulen = htons(8+PRGA_LEN);
tools/tools/netrate/accept_connect/accept_server/accept_server.c
73
in.sin_port = htons(atoi(optarg));
tools/tools/netrate/accept_connect/connect_client/connect_client.c
59
in.sin_port = htons(atoi(optarg));
tools/tools/netrate/accept_connect/kq_accept_server/kq_accept_server.c
91
in.sin_port = htons(atoi(optarg));
tools/tools/netrate/accept_connect/kq_connect_client/kq_connect_client.c
105
port = htons(atoi(optarg));
tools/tools/netrate/kq_sendrecv/kq_recvserv/kq_recvserv.c
106
in.sin_port = htons(strtoul(optarg, NULL, 10));
tools/tools/netrate/kq_sendrecv/kq_recvserv/kq_recvserv.c
219
in.sin_port = htons(port);
tools/tools/netrate/kq_sendrecv/kq_recvserv/kq_recvserv.c
306
ctx->t_in.sin_port = htons(port);
tools/tools/netrate/kq_sendrecv/kq_recvserv/kq_recvserv.c
72
in.sin_port = htons(RECV_PORT);
tools/tools/netrate/kq_sendrecv/kq_sendcli/kq_sendcli.c
263
in_arr[i].sin_port = htons(port);
tools/tools/netrate/pktgen/pktgen.c
468
psum = htons((u_short)pktg->pktg_datalen + sizeof(struct udphdr) +
tools/tools/netrate/pktgen/pktgen.c
470
ulen = htons(pktg->pktg_datalen + sizeof(struct udphdr));
tools/tools/netrate/pktgen/pktgen.c
542
ip->ip_len = htons(ip->ip_len);
tools/tools/netrate/pktgen/pktgen.c
552
eh->ether_type = htons(ETHERTYPE_IP);
tools/tools/netrate/pktgenctl/pktgenctl.c
145
dst_sin->sin_port = htons(dst_sin->sin_port);
tools/tools/netrate/pktgenctl/pktgenctl.c
156
src_sin->sin_port = htons(src_sin->sin_port);
tools/tools/netrate/udpecho/udpecho.c
59
in.sin_port = htons(in.sin_port);
tools/tools/toeplitz/toeplitz.c
182
*port0 = htons(port);
usr.bin/getent/getent.c
513
se = getservbyport(htons((u_short)id), proto);
usr.bin/mkcsmapper/yacc.y
232
u_int16_t oval = htons(val);
usr.bin/rpcinfo/rpcinfo.c
390
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
413
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
440
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
475
server_addr.sin_port = htons(PMAPPORT);
usr.bin/talk/get_iface.c
52
remote.sin_port = htons(60000);
usr.bin/talk/get_iface.c
57
local.sin_port = htons(60000);
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/talk/get_names.c
102
msg.addr.sa_family = htons(AF_INET);
usr.bin/talk/get_names.c
103
msg.ctl_addr.sa_family = htons(AF_INET);
usr.bin/talk/invite.c
73
msg.addr.sa_family = htons(my_addr.sin_family);
usr.bin/talk/look_up.c
55
msg.ctl_addr.sa_family = htons(ctl_addr.sin_family);
usr.bin/tftp/tftp.c
121
dp->th_opcode = htons((u_short)DATA);
usr.bin/tftp/tftp.c
122
dp->th_block = htons((u_short)block);
usr.bin/tftp/tftp.c
233
ap->th_opcode = htons((u_short)ACK);
usr.bin/tftp/tftp.c
234
ap->th_block = htons((u_short)(block));
usr.bin/tftp/tftp.c
308
ap->th_opcode = htons((u_short)ACK); /* has seen err msg */
usr.bin/tftp/tftp.c
309
ap->th_block = htons((u_short)block);
usr.bin/tftp/tftp.c
324
tp->th_opcode = htons((u_short)request);
usr.bin/tftp/tftp.c
364
tp->th_opcode = htons((u_short)ERROR);
usr.bin/tftp/tftp.c
365
tp->th_code = htons((u_short)error);
usr.bin/truss/syscalls.c
261
asprintf(&tmp, "{ AF_INET %s:%d }", addr, htons(lsin->sin_port));
usr.bin/truss/syscalls.c
266
asprintf(&tmp, "{ AF_INET6 [%s]:%d }", addr, htons(lsin6->sin6_port));
usr.sbin/dntpd/ntpreq.c
49
fixed->int_parts = htons(fixed->int_parts);
usr.sbin/dntpd/ntpreq.c
50
fixed->fractions = htons(fixed->fractions);
usr.sbin/ftp-proxy/filter.c
279
pfr.rule.dst.port[0] = htons(d_port);
usr.sbin/fwcontrol/fwdv.c
363
ciph->fdf.dv.cyc = htons(f_cycle << 12 | f_frac);
usr.sbin/fwcontrol/fwdv.c
365
ciph->fdf.dv.cyc = htons(cycle << 12 | f_frac);
usr.sbin/inetd/builtins.c
528
sin4[0].sin_port = htons(lport);
usr.sbin/inetd/builtins.c
530
sin4[1].sin_port = htons(fport);
usr.sbin/inetd/builtins.c
538
sin6[0].sin6_port = htons(lport);
usr.sbin/inetd/builtins.c
540
sin6[1].sin6_port = htons(fport);
usr.sbin/installer/libdfui/conn_tcp.c
113
servaddr.sin_port = htons(server_port);
usr.sbin/installer/libdfui/conn_tcp.c
341
servaddr.sin_port = htons(server_port);
usr.sbin/lpr/common_source/net.c
105
((struct sockaddr_in *) res->ai_addr)->sin_port = htons(rport);
usr.sbin/lpr/lpd/lpd.c
216
serv.s_port = htons(i);
usr.sbin/mld6query/mld6query.c
164
u_short rtalert_code = htons(IP6OPT_RTALERT_MLD);
usr.sbin/mld6query/mld6query.c
183
mldh.mld6_maxdelay = htons(QUERY_RESPONSE_INTERVAL);
usr.sbin/ndp/ndp.c
406
htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
usr.sbin/ndp/ndp.c
478
htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
usr.sbin/ndp/ndp.c
518
htons(((struct sockaddr_in6 *)res->ai_addr)->sin6_scope_id);
usr.sbin/pfctl/parse.y
6040
return (htons(ulval));
usr.sbin/ppp/auth.c
406
authp->in.hdr.length = htons(0);
usr.sbin/ppp/auth.c
410
authp->in.hdr.length = htons(0);
usr.sbin/ppp/cbcp.c
205
head->length = htons(sizeof *head + data->length);
usr.sbin/ppp/chap.c
110
lh.length = htons(plen);
usr.sbin/ppp/fsm.c
213
lh.length = htons(plen);
usr.sbin/ppp/ipcp.c
1115
pcomp->proto = htons(PROTO_VJCOMP);
usr.sbin/ppp/ipcp.c
1141
pcomp->proto = htons(PROTO_VJCOMP);
usr.sbin/ppp/ipcp.c
770
req.proto = htons(ipcp->my_compproto >> 16);
usr.sbin/ppp/libradius/radlib.c
426
srvp->addr.sin_port = htons((u_short)port);
usr.sbin/ppp/libradius/radlib.c
433
sent->s_port : htons(RADIUS_PORT);
usr.sbin/ppp/libradius/radlib.c
437
sent->s_port : htons(RADACCT_PORT);
usr.sbin/ppp/libradius/radlib.c
993
sin.sin_port = htons(0);
usr.sbin/ppp/mppe.c
213
nproto = htons(*proto);
usr.sbin/ppp/nat_cmd.c
176
link = PacketAliasRedirectPort(localaddr, htons(llocalport),
usr.sbin/ppp/nat_cmd.c
177
remoteaddr, htons(lremoteport),
usr.sbin/ppp/nat_cmd.c
178
aliasaddr, htons(laliasport),
usr.sbin/ppp/pap.c
100
lh.length = htons(plen + sizeof(struct fsmheader));
usr.sbin/ppp/pap.c
125
lh.length = htons(plen + sizeof(struct fsmheader));
usr.sbin/ppp/route.c
726
*(u_int16_t *)&sa6->sin6_addr.s6_addr[2] = htons(ifindex);
usr.sbin/ppp/server.c
329
sin6->sin6_port = htons(port);
usr.sbin/ppp/server.c
337
sin->sin_port = htons(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
132
(f) = htons((cp[1] << 8) | cp[2]); \
usr.sbin/ppp/slcompress.c
135
(f) = htons((u_int32_t)*cp++); \
usr.sbin/ppp/slcompress.c
161
if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40) {
usr.sbin/ppp/slcompress.c
487
th->th_sum = htons((*cp << 8) | cp[1]);
usr.sbin/ppp/slcompress.c
530
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
usr.sbin/ppp/slcompress.c
552
cs->cs_ip.ip_len = htons(len);
usr.sbin/ppp/tcp.c
75
dest.sin_port = htons(atoi(port));
usr.sbin/ppp/tcpmss.c
135
*mss = htons(maxmss);
usr.sbin/ppp/udp.c
219
dev->sock.sin_port = htons(atoi(port));
usr.sbin/pppctl/pppctl.c
328
ifsin.sin_port = htons(atoi(port));
usr.sbin/rarpd/rarpd.c
803
ap->arp_op = htons(REVARP_REPLY);
usr.sbin/route6d/route6d.c
1946
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
2136
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
2484
np->rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
2991
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
756
rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/rpc.lockd/lockd.c
375
sin->sin_port = htons(0);
usr.sbin/rpc.lockd/lockd.c
386
sin6->sin6_port = htons(0);
usr.sbin/rtadvd/config.c
1396
ra->nd_ra_router_lifetime = htons(rai->rai_lifetime);
usr.sbin/sdpd/sar.c
291
pdu.len = htons(sizeof(bcount) + bcount + 1 + cs[0]);
usr.sbin/sdpd/sar.c
293
bcount = htons(bcount);
usr.sbin/sdpd/server.c
598
rsp.pdu.len = htons(sizeof(rsp.error));
usr.sbin/sdpd/server.c
599
rsp.error = htons(error);
usr.sbin/sdpd/srr.c
124
pdu.len = htons(srv->fdidx[fd].rsp_size);
usr.sbin/sdpd/ssr.c
280
pdu.len = htons(sizeof(rcounts) + rcounts[1] * 4 + 1 + cs[0]);
usr.sbin/sdpd/ssr.c
282
rcounts[0] = htons(rcounts[0]);
usr.sbin/sdpd/ssr.c
283
rcounts[1] = htons(rcounts[1]);
usr.sbin/traceroute/traceroute.c
1044
icp->icmp_id == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1045
icp->icmp_seq == htons(seq))
usr.sbin/traceroute/traceroute.c
1050
icmpp->icmp_id == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1051
icmpp->icmp_seq == htons(seq))
usr.sbin/traceroute/traceroute.c
1058
up->uh_sport == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1059
((iflag && up->uh_dport == htons(port + seq)) ||
usr.sbin/traceroute/traceroute.c
1060
(!iflag && up->uh_dport == htons(port))))
usr.sbin/traceroute/traceroute.c
905
ip->ip_len = htons(datalen);
usr.sbin/traceroute/traceroute.c
907
ip->ip_id = htons(ident+seq);
usr.sbin/traceroute/traceroute.c
913
icmpp->icmp_seq = htons(seq);
usr.sbin/traceroute/traceroute.c
914
icmpp->icmp_id = htons(ident);
usr.sbin/traceroute/traceroute.c
918
up->uh_sport = htons(ident);
usr.sbin/traceroute/traceroute.c
920
up->uh_dport = htons(port+seq);
usr.sbin/traceroute/traceroute.c
922
up->uh_dport = htons(port);
usr.sbin/traceroute/traceroute.c
923
up->uh_ulen = htons((u_short)(datalen - sizeof(struct ip) -
usr.sbin/traceroute6/traceroute6.c
1053
((struct icmp6_hdr *)up)->icmp6_seq == htons(seq))
usr.sbin/traceroute6/traceroute6.c
1058
if (((struct udphdr *)up)->uh_sport == htons(srcport) &&
usr.sbin/traceroute6/traceroute6.c
1059
((struct udphdr *)up)->uh_dport == htons(port + seq))
usr.sbin/traceroute6/traceroute6.c
1071
icp->icmp6_seq == htons(seq))
usr.sbin/traceroute6/traceroute6.c
407
ident = htons(getpid() & 0xffff); /* same as ping6 */
usr.sbin/traceroute6/traceroute6.c
680
Nxt.sin6_port = htons(DUMMY_PORT);
usr.sbin/traceroute6/traceroute6.c
703
Src.sin6_port = htons(0);
usr.sbin/traceroute6/traceroute6.c
855
Dst.sin6_port = htons(port + seq);
usr.sbin/traceroute6/traceroute6.c
868
icp->icmp6_seq = htons(seq);
usr.sbin/ypbind/yp_ping.c
118
address->sin_port = htons(PMAPPORT);
usr.sbin/ypbind/yp_ping.c
234
sin.sin_port = htons(__pmap_getport(&sin, YPPROG,
usr.sbin/ypserv/yp_main.c
306
saddr.sin_port = htons(yp_port);
usr.sbin/ypserv/yp_server.c
280
addr->sin_port = htons(port);
usr.sbin/ypset/ypset.c
69
if ((port = htons(getrpcport(server, YPPROG, YPPROC_NULL, IPPROTO_UDP))) == 0)