bin/date/netdate.c
126
msg.tsp_seq = htons((in_port_t)0);
crypto/dist/ipsec-tools/src/libipsec/pfkey.c
2455
p->sadb_x_nat_t_port_port = htons(l_natt_port);
crypto/dist/ipsec-tools/src/racoon/cfparse.y
1983
((struct sockaddr_in *)$$)->sin_port = htons($2);
crypto/dist/ipsec-tools/src/racoon/dump.c
194
ip.ip_len = htons(sizeof(ip) + sizeof(uh) + msg->l);
crypto/dist/ipsec-tools/src/racoon/dump.c
205
ip6.ip6_plen = htons(sizeof(uh) + msg->l);
crypto/dist/ipsec-tools/src/racoon/dump.c
213
uh.uh_sport = htons(500);
crypto/dist/ipsec-tools/src/racoon/dump.c
214
uh.uh_dport = htons(500);
crypto/dist/ipsec-tools/src/racoon/dump.c
215
uh.uh_ulen = htons(msg->l & 0xffff);
crypto/dist/ipsec-tools/src/racoon/dump.c
216
uh.uh_sum = htons(0x0000); /*no checksum - invalid for IPv6*/
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1430
((struct isakmp_gen *)bp)->len = htons(newtlen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1450
((struct isakmp_pl_p *)bp)->h.len = htons(prophlen + trnslen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1459
((struct isakmp_pl_t *)bp)->h.len = htons(trnslen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1578
((struct isakmp_gen *)bp)->len = htons(newtlen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1605
((struct isakmp_pl_p *)bp)->h.len = htons(prophlen + trnslen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1613
((struct isakmp_pl_t *)bp)->h.len = htons(trnslen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2623
prop->h.len = htons(proplen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2653
trns->h.len = htons(trnslen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3026
secctx.ctx_strlen = htons(pp->sctx.ctx_strlen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3033
trns->h.len = htons(sizeof(*trns) + attrlen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3048
prop->h.len = htons(p->l);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3651
id_b.port = htons(PORT_ISAKMP);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2379
data->type = htons((uint16_t)type | ISAKMP_GEN_TLV);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2380
data->lorv = htons((uint16_t)len);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2393
data->type = htons((uint16_t)type | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2394
data->lorv = htons((uint16_t)val);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2422
data->type = htons((uint16_t)type | ISAKMP_GEN_TLV);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2423
data->lorv = htons((uint16_t)len);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2452
data->type = htons((uint16_t)type | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2453
data->lorv = htons((uint16_t)val);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2645
gen->len = htons(sizeof(*gen) + src->l);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1016
new->lorv = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1041
new->lorv = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1075
new->lorv = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1220
gen->len = htons(sizeof(*gen) + hash->l);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1684
attrpl->h.len = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1686
attrpl->id = htons((uint16_t)(eay_random() & 0xffff));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1691
attr->type = htons(attrlist[i]);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1692
attr->lorv = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
607
reply->h.len = htons(payload->l);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
708
reply->h.len = htons(payload->l);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
914
new->lorv = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
956
new->type = htons(type | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
957
new->lorv = htons(value);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
982
new->lorv = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
136
fraghdr->unknown0 = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
137
fraghdr->len = htons(fraglen - sizeof(*hdr));
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
138
fraghdr->unknown1 = htons(1);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1031
n->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1035
n->type = htons(type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1371
ru_ack->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1373
ru_ack->type = htons(ISAKMP_NTYPE_R_U_THERE_ACK);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1484
ru->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
1486
ru->type = htons(ISAKMP_NTYPE_R_U_THERE);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
587
d->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
591
d->num_spi = htons(1);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
650
d->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
654
d->num_spi = htons(1);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
724
n->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
728
n->type = htons(type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
783
n->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
787
n->type = htons(type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
830
n->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
834
n->type = htons(type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
940
gen->len = htons(sizeof(*gen) + hash->l);
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
1855
n->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
1859
n->type = htons(ISAKMP_NTYPE_CONNECTED);
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
279
new->lorv = htons(len);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1587
attr->type = htons(type | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1588
attr->lorv = htons(value);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
159
attr->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1592
attr->type = htons(type | ISAKMP_GEN_TLV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1593
attr->lorv = htons(dlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
161
attr->id = htons(eay_random());
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
164
typeattr->type = htons(XAUTH_TYPE | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
165
typeattr->lorv = htons(XAUTH_TYPE_GENERIC);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
168
usrattr->type = htons(XAUTH_USER_NAME | ISAKMP_GEN_TLV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
169
usrattr->lorv = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1704
attr->type = htons(type | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1705
attr->lorv = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
172
pwdattr->type = htons(XAUTH_USER_PASSWORD | ISAKMP_GEN_TLV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
173
pwdattr->lorv = htons(0);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
422
attr->h.len = htons(tlen);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
424
attr->id = htons(id);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
427
stattr->type = htons(XAUTH_STATUS | ISAKMP_GEN_TV);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
428
stattr->lorv = htons(status);
crypto/dist/ipsec-tools/src/racoon/sockmisc.c
976
*port_ptr = htons(new_port);
crypto/dist/ipsec-tools/src/setkey/parse.y
1542
natt_port.sadb_x_nat_t_port_port = htons(get_port(s));
crypto/dist/ipsec-tools/src/setkey/parse.y
1550
natt_port.sadb_x_nat_t_port_port = htons(get_port(d));
dist/pf/libexec/tftp-proxy/filter.c
288
pfr.rule.dst.port[0] = htons(d_port);
dist/pf/libexec/tftp-proxy/tftp-proxy.c
267
sock_out.sin_port = htons(pick_proxy_port());
dist/pf/sbin/pfctl/parse.y
5456
return (htons(ulval));
dist/pf/usr.sbin/ftp-proxy/filter.c
310
pfr.rule.dst.port[0] = htons(d_port);
dist/pf/usr.sbin/ftp-proxy/ipf.c
250
ipn->in_odport = htons(d_port);
dist/pf/usr.sbin/ftp-proxy/ipf.c
251
ipn->in_dtop = htons(d_port);
dist/pf/usr.sbin/ftp-proxy/ipf.c
254
ipn->in_dpnext = htons(rdr_port);
dist/pf/usr.sbin/ftp-proxy/npf.c
184
fp_server_sa.sin_port = htons(atoi(port));
dist/pf/usr.sbin/ftp-proxy/npf.c
342
errno = npf_nat_setport(nt, htons(rdr_port));
games/hunt/hunt/server.c
211
contactaddr.sin_port = htons(port);
games/hunt/hunt/server.c
220
wiremsg = htons(msg);
games/hunt/hunt/server.c
233
wiremsg = htons(msg);
games/hunt/hunt/server.c
254
wiremsg = htons(msg);
games/hunt/huntd/driver.c
166
sin->sin_port = htons(port);
games/hunt/huntd/driver.c
260
reply = htons((u_short) Nplayer);
games/hunt/huntd/driver.c
267
reply = htons(statport);
games/hunt/huntd/driver.c
277
reply = htons(huntport);
include/protocols/routed.h
76
#define RIP_AF_INET htons(AF_INET)
include/protocols/routed.h
93
#define RIP_AUTH_PW htons(2) /* password type */
include/protocols/routed.h
94
#define RIP_AUTH_MD5 htons(3) /* Keyed MD5 */
lib/libc/citrus/citrus_db_factory.c
183
*p = htons(val);
lib/libc/compat/net/compat_ns_addr.c
146
hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
lib/libc/compat/net/compat_ns_addr.c
147
hb[2] = htons(hb[2]);
lib/libc/compat/net/compat_ns_ntoa.c
55
uint16_t port = htons(addr.x_port);
lib/libc/net/getaddrinfo.c
1579
port = htons(port);
lib/libc/net/getaddrinfo.c
1978
*getport(cur) = htons(srv->port);
lib/libc/net/getservent_r.c
152
sp->s_port = htons((u_short)atoi(p));
lib/libc/net/inet6_scopeid.c
74
uint16_t scope = htons(sin6->sin6_scope_id);
lib/libc/net/rcmd.c
579
*portp = htons((u_short)*alport);
lib/libc/resolv/res_init.c
247
u[nserv].sin.sin_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_init.c
259
u[nserv].sin6.sin6_port = htons(NAMESERVER_PORT);
lib/libc/resolv/res_mkquery.c
142
hp->id = htons(statp->id);
lib/libc/resolv/res_mkquery.c
169
hp->qdcount = htons(1);
lib/libc/resolv/res_mkquery.c
190
hp->arcount = htons(1);
lib/libc/resolv/res_mkquery.c
212
hp->ancount = htons(1);
lib/libc/resolv/res_mkquery.c
271
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libc/rpc/clnt_bcast.c
612
htons((u_short)port);
lib/libc/rpc/pmap_getmaps.c
93
address->sin_port = htons(PMAPPORT);
lib/libc/rpc/pmap_getport.c
118
address->sin_port = htons(PMAPPORT);
lib/libc/rpc/pmap_rmt.c
103
addr->sin_port = htons(PMAPPORT);
lib/libc/rpc/rpc_generic.c
737
sinp->sin_port = htons(port);
lib/libc/rpc/rpc_generic.c
754
sin6->sin6_port = htons(port);
lib/libc/rpc/rpc_soc.c
147
raddr->sin_port = htons(sport);
lib/libc/rpc/rpc_soc.c
322
addr->sin_port = htons(PMAPPORT);
lib/libc/rpc/rpcb_clnt.c
752
port = htons(port);
lib/libisns/isns_util.h
42
#define isns_htons htons
lib/libnpf/npf.c
1409
nvlist_add_number(key_nv, "sport", htons(port[0]));
lib/libnpf/npf.c
1410
nvlist_add_number(key_nv, "dport", htons(port[1]));
lib/libnpf/npf.c
1466
port[0] = htons(port[0]); port[1] = htons(port[1]);
lib/libradius/radlib.c
362
srvp->addr.sin_port = htons((u_short)port);
lib/libradius/radlib.c
369
sent->s_port : htons(RADIUS_PORT);
lib/libradius/radlib.c
373
sent->s_port : htons(RADACCT_PORT);
lib/libradius/radlib.c
725
saddr.sin_port = htons(0);
lib/libresolv/ns_sign.c
171
u_int16_t len_n = htons(querysiglen);
lib/libresolv/ns_sign.c
251
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libresolv/ns_sign.c
304
u_int16_t siglen_n = htons(state->siglen);
lib/libresolv/ns_sign.c
388
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libresolv/ns_verify.c
228
hp->arcount = htons(ntohs(hp->arcount) - 1);
lib/libresolv/ns_verify.c
242
u_int16_t len_n = htons(querysiglen);
lib/libresolv/ns_verify.c
306
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libresolv/ns_verify.c
314
hp->arcount = htons(ntohs(hp->arcount) - 1);
lib/libresolv/ns_verify.c
366
u_int16_t siglen_n = htons(state->siglen);
lib/libresolv/ns_verify.c
387
hp->arcount = htons(ntohs(hp->arcount) - 1);
lib/libresolv/res_findzonecut.c
617
arr->addr.sin.sin_port = htons(NAMESERVER_PORT);
lib/libresolv/res_findzonecut.c
626
arr->addr.sin.sin_port = htons(NAMESERVER_PORT);
lib/libresolv/res_mkupdate.c
108
hp->id = htons(statp->id);
lib/libresolv/res_mkupdate.c
1110
serv.s_port = htons((u_int16_t)lp->port);
lib/libresolv/res_mkupdate.c
1163
ss = cgetservbyport(htons(port), proto);
lib/libresolv/res_mkupdate.c
716
hp->qdcount = htons(counts[0]);
lib/libresolv/res_mkupdate.c
717
hp->ancount = htons(counts[1]);
lib/libresolv/res_mkupdate.c
718
hp->nscount = htons(counts[2]);
lib/libresolv/res_mkupdate.c
719
hp->arcount = htons(counts[3]);
lib/librumpuser/sp_common.c
617
sin.sin_port = htons(port);
lib/libwrap/rfc931.c
164
htons(ANY_PORT);
lib/libwrap/rfc931.c
169
htons(ANY_PORT);
lib/libwrap/rfc931.c
177
htons(RFC931_PORT);
lib/libwrap/rfc931.c
182
htons(RFC931_PORT);
libexec/ftpd/ftpd.c
1958
data_source.su_port = htons(port);
libexec/ftpd/ftpd.c
3031
pasv_addr.su_port = htons(port);
libexec/identd/identd.c
419
satosin(&ss[0])->sin_port = htons(fport);
libexec/identd/identd.c
420
satosin(&ss[1])->sin_port = htons(lport);
libexec/identd/identd.c
423
satosin6(&ss[0])->sin6_port = htons(fport);
libexec/identd/identd.c
424
satosin6(&ss[1])->sin6_port = htons(lport);
libexec/identd/ipf.c
90
satosin(nat_addr)->sin_port = htons(113);
libexec/identd/npf.c
100
satosin(nat_addr)->sin_port = htons(113);
libexec/identd/npf.c
105
satosin6(nat_addr)->sin6_port = htons(113);
libexec/identd/pf.c
88
satosin(nat_addr)->sin_port = htons(113);
libexec/identd/pf.c
95
satosin6(nat_addr)->sin6_port = htons(113);
libexec/rexecd/rexecd.c
201
((struct sockaddr_in *)fromp)->sin_port = htons(port);
libexec/rexecd/rexecd.c
204
((struct sockaddr_in6 *)fromp)->sin6_port = htons(port);
libexec/rshd/rshd.c
378
*portp = htons(port);
libexec/talkd/process.c
119
rp->addr.sa_family = htons(ptr->addr.sa_family);
libexec/tftpd/tftpd.c
1067
ap->th_opcode = htons((u_short)ACK);
libexec/tftpd/tftpd.c
1068
ap->th_block = htons((u_short)block);
libexec/tftpd/tftpd.c
1136
ap->th_opcode = htons((u_short)ACK); /* send the "final" ack */
libexec/tftpd/tftpd.c
1137
ap->th_block = htons((u_short)(block));
libexec/tftpd/tftpd.c
1201
tp->th_opcode = htons((u_short)ERROR);
libexec/tftpd/tftpd.c
1210
tp->th_code = htons((u_short)error);
libexec/tftpd/tftpd.c
751
oack_h->th_opcode = htons(OACK);
libexec/tftpd/tftpd.c
975
dp->th_opcode = htons((u_short)DATA);
libexec/tftpd/tftpd.c
976
dp->th_block = htons((u_short)block);
regress/sys/compat/uipc_syscalls_43.c
100
sa.sin_port = htons(65533);
regress/sys/compat/uipc_syscalls_43.c
118
sa.sin_port = htons(echoport);
regress/sys/compat/uipc_syscalls_43.c
146
sa.sin_port = htons(65533);
regress/sys/compat/uipc_syscalls_43.c
152
sa.sin_port = htons(echoport);
regress/sys/compat/uipc_syscalls_43.c
51
sa.sin_port = htons(echoport);
regress/sys/net/frag/ip4_frag_1.c
108
ip->ip_id = htons(1);
regress/sys/net/frag/ip4_frag_1.c
293
ip->ip_id = htons(321);
sbin/fsck_ffs/setup.c
657
appleufs->ul_namelen = htons(APPLEUFS_MAX_LABEL_NAME);
sbin/ifconfig/af_atalk.c
104
nr->nr_firstnet = htons(first);
sbin/ifconfig/af_atalk.c
105
nr->nr_lastnet = htons(last);
sbin/ifconfig/parse.c
411
u.sat.sat_addr.s_net = htons(net);
sbin/iscsid/iscsid_discover.c
443
isns->reg_ip_port = htons(si->sin_port);
sbin/iscsid/iscsid_discover.c
454
isns->reg_ip_port = htons(si->sin6_port);
sbin/mount_nfs/getnfsargs_small.c
250
set_port(d.ai->ai_addr, htons(nfs_port));
sbin/ping/ping.c
1099
if (icp->icmp_seq == htons((u_int16_t)(ntransmitted-1)))
sbin/ping/ping.c
903
opack_icmp.icmp_seq = htons((u_int16_t)(ntransmitted));
sbin/ping6/ping6.c
1105
nip->ni_qtype = htons(NI_QTYPE_FQDN);
sbin/ping6/ping6.c
1106
nip->ni_flags = htons(0);
sbin/ping6/ping6.c
1114
nip->ni_qtype = htons(NI_QTYPE_FQDN);
sbin/ping6/ping6.c
1115
nip->ni_flags = htons(0);
sbin/ping6/ping6.c
1120
nip->ni_qtype = htons(NI_QTYPE_NODEADDR);
sbin/ping6/ping6.c
1128
nip->ni_qtype = htons(NI_QTYPE_SUPTYPES);
sbin/ping6/ping6.c
1145
icp->icmp6_id = htons(ident);
sbin/routed/input.c
221
} else if (from->sin_port == htons(RIP_PORT)) {
sbin/routed/input.c
229
if (from->sin_port == htons(RIP_PORT)) {
sbin/routed/input.c
295
if (from->sin_port != htons(RIP_PORT)) {
sbin/routed/input.c
440
if (from->sin_port != htons(RIP_PORT)) {
sbin/routed/main.c
665
rsin.sin_port = htons(RIP_PORT);
sbin/routed/output.c
117
osin.sin_port = htons(RIP_PORT);
sbin/routed/output.c
311
na2->a_type = htons(1);
sbin/routed/output.c
312
na->au.a_md5.md5_pkt_len = htons(len);
sbin/routed/rdisc.c
813
u.ad.icmp_ad_life = stopint ? 0 : htons(ifp->int_rdisc_int*3);
sbin/routed/rtquery/rtquery.c
350
myaddr.sin_port = htons(IPPORT_RESERVED-1);
sbin/routed/rtquery/rtquery.c
358
myaddr.sin_port = htons(myaddr.sin_port);
sbin/routed/rtquery/rtquery.c
409
NA0.au.a_md5.md5_pkt_len = htons(cc);
sbin/routed/rtquery/rtquery.c
411
NA2.a_type = htons(1);
sbin/routed/rtquery/rtquery.c
536
router.sin_port = htons(RIP_PORT);
share/doc/psd/20.ipctut/dgramsend.c
73
name.sin_port = htons(atoi(argv[2]));
share/doc/psd/20.ipctut/streamwrite.c
70
server.sin_port = htons(atoi(argv[2]));
share/examples/refuse/ian/libfetch/ftp.c
750
sin6->sin6_port = htons(port);
share/examples/refuse/ian/libfetch/ftp.c
759
sin4->sin_port = htons(port);
share/examples/refuse/ian/libfetch/ftp.c
842
htons(sin6->sin6_port));
sys/altq/altq_blue.c
568
ip->ip_sum = htons(~sum & 0xffff);
sys/altq/altq_red.c
587
ip->ip_sum = htons(~sum & 0xffff);
sys/altq/altq_subr.c
725
ip->ip_sum = htons(~sum & 0xffff);
sys/arch/hpc/stand/hpcboot/file_http.cpp
175
_sockaddr.sin_port = htons(port);
sys/arch/hpc/stand/include/machine/endian.h
153
#define HTONS(x) (x) = htons((uint16_t)(x))
sys/arch/hpc/stand/include/machine/endian.h
86
uint16_t htons(uint16_t) __attribute__((__const__));
sys/arch/mips/mips/in_cksum.c
296
u.ipov.ih_len = htons(len);
sys/arch/newsmips/apbus/if_sn.c
1044
device_xname(sc->sc_dev), eh, len, htons(eh->ether_type),
sys/arch/newsmips/apbus/if_sn.c
897
htons(eh->ether_type),
sys/arch/powerpc/ibm4xx/dev/if_emac.c
1122
(ip->ip_off & htons(IP_OFFMASK | IP_MF)) != 0)
sys/arch/powerpc/ibm4xx/dev/if_emac.c
906
if (ip->ip_off & htons(IP_OFFMASK | IP_MF))
sys/arch/powerpc/powerpc/in_cksum.c
259
u.ipov.ih_len = htons(len);
sys/arch/usermode/usermode/thunk.c
1035
sin.sin_port = htons(portnr);
sys/arch/usermode/usermode/thunk.c
1139
*(uint16_t *)p = htons(rfb->width); p += 2;
sys/arch/usermode/usermode/thunk.c
1140
*(uint16_t *)p = htons(rfb->height); p += 2;
sys/arch/usermode/usermode/thunk.c
1145
*(uint16_t *)p = htons(0xff); p += 2; /* red max */
sys/arch/usermode/usermode/thunk.c
1146
*(uint16_t *)p = htons(0xff); p += 2; /* green max */
sys/arch/usermode/usermode/thunk.c
1147
*(uint16_t *)p = htons(0xff); p += 2; /* blue max */
sys/arch/usermode/usermode/thunk.c
1230
*(uint16_t *)p = htons(rfb->nupdates); p += 2; /* # rects */
sys/arch/usermode/usermode/thunk.c
1241
*(uint16_t *)p = htons(update->x); p += 2;
sys/arch/usermode/usermode/thunk.c
1242
*(uint16_t *)p = htons(update->y); p += 2;
sys/arch/usermode/usermode/thunk.c
1243
*(uint16_t *)p = htons(update->w); p += 2;
sys/arch/usermode/usermode/thunk.c
1244
*(uint16_t *)p = htons(update->h); p += 2;
sys/arch/usermode/usermode/thunk.c
1266
*(uint16_t *)p = htons(update->srcx); p += 2;
sys/arch/usermode/usermode/thunk.c
1267
*(uint16_t *)p = htons(update->srcy); p += 2;
sys/arch/usermode/usermode/thunk.c
1281
*(uint16_t *)p = htons(update->x); p += 2;
sys/arch/usermode/usermode/thunk.c
1282
*(uint16_t *)p = htons(update->y); p += 2;
sys/arch/usermode/usermode/thunk.c
1283
*(uint16_t *)p = htons(update->w); p += 2;
sys/arch/usermode/usermode/thunk.c
1284
*(uint16_t *)p = htons(update->h); p += 2;
sys/arch/usermode/usermode/thunk.c
999
sin.sin_port = htons(port);
sys/arch/xen/xen/xennet_checksum.c
100
if (__predict_false(etype == htons(ETHERTYPE_VLAN))) {
sys/arch/xen/xen/xennet_checksum.c
111
case htons(ETHERTYPE_IP):
sys/arch/xen/xen/xennet_checksum.c
122
case htons(ETHERTYPE_IPV6):
sys/dev/hyperv/if_hvn.c
1489
if (evl->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/hyperv/if_hvn.c
1701
evl.evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/dev/hyperv/if_hvn.c
1702
evl.evl_tag = htons(vlan_get_tag(m));
sys/dev/hyperv/if_hvn.c
4839
evl->evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/dev/hyperv/if_hvn.c
4840
evl->evl_tag = htons(t);
sys/dev/ic/an.c
774
len = htons(m->m_pkthdr.len - sizeof(struct ieee80211_frame));
sys/dev/ic/hd64570.c
1655
cisco->time0 = htons((u_int16_t)(t >> 16));
sys/dev/ic/hd64570.c
1656
cisco->time1 = htons((u_int16_t)(t & 0x0000ffff));
sys/dev/ic/hd64570.c
835
hdlc->h_proto = htons(HDLC_PROTOCOL_IP);
sys/dev/ic/hd64570.c
848
hdlc->h_proto = htons(HDLC_PROTOCOL_IPV6);
sys/dev/ic/rtl8169.c
509
eh->ether_type = htons(ETHERTYPE_IP);
sys/dev/ieee1394/if_fwip.c
202
hwaddr->sender_unicast_FIFO_hi = htons((uint16_t)(INET_FIFO >> 32));
sys/dev/iscsi/iscsi_ioctl.c
1503
iscsi_InitiatorISID.ISID_B = htons(0x1);
sys/dev/iscsi/iscsi_send.c
1262
hpdu->pduh_p.logout_req.CID = htons(refconn->c_id);
sys/dev/iscsi/iscsi_send.c
693
hpdu->pduh_p.login_req.CID = htons(conn->c_id);
sys/dev/marvell/if_mvxpe.c
2215
switch (htons(eh->ether_type)) {
sys/dev/pci/cxgb/cxgb_lro.c
188
ih->ip_len = htons(s->ip_len);
sys/dev/pci/cxgb/cxgb_offload.c
1205
req->word = htons(W_TCB_L2T_IX);
sys/dev/pci/if_age.c
1283
vtag = AGE_TX_VLAN_TAG(htons(vlan_get_tag(m)));
sys/dev/pci/if_alc.c
1977
vtag = htons(vlan_get_tag(m));
sys/dev/pci/if_ale.c
993
vtag = ALE_TX_VLAN_TAG(htons(vlan_get_tag(m)));
sys/dev/pci/if_bge.c
5248
switch (htons(eh->ether_type)) {
sys/dev/pci/if_bge.c
5293
ip.ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_bge.c
5328
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_bge.c
5361
ip->ip_len = htons(mss + ip_tcp_hlen);
sys/dev/pci/if_bge.c
5684
CSR_WRITE_4(sc, BGE_MAC_ADDR1_LO, htons(m[0]));
sys/dev/pci/if_bge.c
5686
((uint32_t)htons(m[1]) << 16) | htons(m[2]));
sys/dev/pci/if_bnx.c
4733
htons(eh->ether_type)));
sys/dev/pci/if_bwfm_pci.c
1674
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_bwfm_pci.c
1741
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_bwfm_pci.c
1956
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_dge.c
1075
switch (htons(eh->ether_type)) {
sys/dev/pci/if_ena.c
2706
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/pci/if_ena.c
2710
etype = htons(eh->evl_encap_proto);
sys/dev/pci/if_ena.c
2729
if ((ip->ip_off & htons(IP_DF)) != 0)
sys/dev/pci/if_iavf.c
2915
switch (htons(eh->ether_type)) {
sys/dev/pci/if_iwi.c
1803
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_iwm.c
7911
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_iwn.c
3328
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/if_ixl.c
2605
switch (htons(eh->ether_type)) {
sys/dev/pci/if_jme.c
1371
ip.ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_jme.c
1405
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_mcx.c
7870
evh->evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/dev/pci/if_mcx.c
7871
evh->evl_tag = htons(vlan_get_tag(m));
sys/dev/pci/if_ti.c
1084
CSR_WRITE_4(sc, TI_GCR_MAR0, htons(m[0]));
sys/dev/pci/if_ti.c
1085
CSR_WRITE_4(sc, TI_GCR_MAR1, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/pci/if_ti.c
1089
ext[0] = htons(m[0]);
sys/dev/pci/if_ti.c
1090
ext[1] = (htons(m[1]) << 16) | htons(m[2]);
sys/dev/pci/if_ti.c
1112
CSR_WRITE_4(sc, TI_GCR_MAR0, htons(m[0]));
sys/dev/pci/if_ti.c
1113
CSR_WRITE_4(sc, TI_GCR_MAR1, (htons(m[1]) << 16) | htons(m[2]));
sys/dev/pci/if_ti.c
1117
ext[0] = htons(m[0]);
sys/dev/pci/if_ti.c
1118
ext[1] = (htons(m[1]) << 16) | htons(m[2]);
sys/dev/pci/if_ti.c
2001
if ((ip->ip_off & htons(IP_MF | IP_OFFMASK)) == 0) {
sys/dev/pci/if_txp.c
1540
(htons(vlan_get_tag(m)) << TX_PFLAGS_VLANTAG_S);
sys/dev/pci/if_txp.c
800
vlan_set_tag(m, htons(rxd->rx_vlan >> 16));
sys/dev/pci/if_vmx.c
2994
switch (htons(eh->ether_type)) {
sys/dev/pci/if_vmx.c
3042
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_wm.c
8630
switch (htons(eh->ether_type)) {
sys/dev/pci/if_wm.c
8688
ip.ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_wm.c
8718
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_wm.c
9291
switch (htons(eh->ether_type)) {
sys/dev/pci/if_wm.c
9356
ip.ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_wm.c
9386
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/if_wpi.c
2162
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/pci/igc/if_igc.c
3244
if (evl->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/pci/igc/if_igc.c
3272
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/ixgbe/if_fdir.c
100
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/pci/ixgbe/if_fdir.c
109
if (etype != htons(ETHERTYPE_IP))
sys/dev/pci/ixgbe/if_fdir.c
137
common.flex_bytes ^= htons(ETHERTYPE_VLAN);
sys/dev/pci/ixgbe/ix_txrx.c
1015
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/pci/ixgbe/ix_txrx.c
1033
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
sys/dev/pci/ixgbe/ix_txrx.c
884
if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) {
sys/dev/pci/xmm7360.c
1439
skb->protocol = htons(ETH_P_IP);
sys/dev/pci/xmm7360.c
1441
skb->protocol = htons(ETH_P_IPV6);
sys/dev/qbus/if_dmc.c
805
dh->dmc_type = htons((u_short)type);
sys/dev/usb/if_bwfm_usb.c
798
ac = (eh->ether_type != htons(ETHERTYPE_PAE)) ?
sys/dev/usb/if_mue.c
965
switch (type = htons(type)) {
sys/dev/usb/if_ure.c
1088
switch (type = htons(type)) {
sys/dist/pf/net/if_pfsync.c
1591
ip->ip_len = htons(m->m_pkthdr.len);
sys/dist/pf/net/if_pfsync.c
1593
ip->ip_off = htons(IP_DF);
sys/dist/pf/net/if_pfsync.h
204
(d)->max_win = htons((s)->max_win); \
sys/dist/pf/net/if_pfsync.h
205
(d)->mss = htons((s)->mss); \
sys/dist/pf/net/if_pfsync.h
210
htons((s)->scrub->pfss_flags & PFSS_TIMESTAMP); \
sys/dist/pf/net/pf.c
1747
h->ip_len = htons(tlen);
sys/dist/pf/net/pf.c
1760
h6->ip6_plen = htons(tlen);
sys/dist/pf/net/pf.c
1779
th->th_win = htons(win);
sys/dist/pf/net/pf.c
1799
h->ip_len = htons(len);
sys/dist/pf/net/pf.c
1800
h->ip_off = htons(ip_mtudisc ? IP_DF : 0);
sys/dist/pf/net/pf.c
2470
key.gwy.port = htons(low);
sys/dist/pf/net/pf.c
2472
*nport = htons(low);
sys/dist/pf/net/pf.c
2487
key.gwy.port = htons(tmp);
sys/dist/pf/net/pf.c
2490
*nport = htons(tmp);
sys/dist/pf/net/pf.c
2495
key.gwy.port = htons(tmp);
sys/dist/pf/net/pf.c
2498
*nport = htons(tmp);
sys/dist/pf/net/pf.c
2740
*nport = htons((u_int16_t)tmp_nport);
sys/dist/pf/net/pf.c
2742
*nport = htons(r->rpool.proxy_port[0]);
sys/dist/pf/net/pf.c
4506
if (h2.ip_off & htons(IP_OFFMASK)) {
sys/dist/pf/net/pf.c
5401
if (ip->ip_off & htons(IP_DF)) {
sys/dist/pf/net/pf.c
5557
dst.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
sys/dist/pf/net/pf.c
5798
if (h->ip_off & htons(IP_MF | IP_OFFMASK)) {
sys/dist/pf/net/pf.c
6141
if (htons(h->ip6_plen) == 0) {
sys/dist/pf/net/pf_ioctl.c
960
(stor) = htons((st)->elm); \
sys/dist/pf/net/pf_norm.c
1031
if (h->ip_off & ~htons(IP_DF)) {
sys/dist/pf/net/pf_norm.c
1034
h->ip_off &= htons(IP_DF);
sys/dist/pf/net/pf_norm.c
1909
*mss, htons(r->max_mss), 0);
sys/dist/pf/net/pf_norm.c
1910
*mss = htons(r->max_mss);
sys/dist/pf/net/pf_norm.c
428
ip->ip_off = htons(ntohs(ip->ip_off) + (precut >> 3));
sys/dist/pf/net/pf_norm.c
431
ip->ip_len = htons(ip_len);
sys/dist/pf/net/pf_norm.c
445
htons(ntohs(frea->fr_ip->ip_len) - aftercut);
sys/dist/pf/net/pf_norm.c
446
frea->fr_ip->ip_off = htons(ntohs(frea->fr_ip->ip_off) +
sys/dist/pf/net/pf_norm.c
532
ip->ip_len = htons(off + hlen);
sys/dist/pf/net/pf_norm.c
686
h->ip_off = htons(ntohs(h->ip_off) +
sys/dist/pf/net/pf_norm.c
688
h->ip_len = htons(ntohs(h->ip_len) - precut);
sys/dist/pf/net/pf_norm.c
743
h->ip_len = htons(ntohs(h->ip_len) - aftercut);
sys/dist/pf/net/pf_norm.c
908
if (r->rule_flag & PFRULE_NODF && h->ip_off & htons(IP_DF)) {
sys/dist/pf/net/pf_norm.c
911
h->ip_off &= htons(~IP_DF);
sys/dist/pf/net/pf_norm.c
923
if (h->ip_off & htons(IP_DF)) {
sys/dist/pf/net/pf_osfp.c
136
if ((ip->ip_off & htons(IP_OFFMASK)) != 0)
sys/dist/pf/net/pf_osfp.c
149
if (ip->ip_off & htons(IP_DF))
sys/fs/nfs/client/nfs_clrpcops.c
900
port = htons(nfsv4_cbport);
sys/fs/nfs/client/nfs_clvfsops.c
831
sin->sin_port = htons(2049);
sys/fs/nfs/common/bootp_subr.c
1333
ifctx->call.flags = htons(0x8000); /* We need a broadcast answer */
sys/fs/nfs/common/bootp_subr.c
648
sin->sin_port = htons(IPPORT_BOOTPC);
sys/fs/nfs/common/bootp_subr.c
661
sin->sin_port = htons(IPPORT_BOOTPS);
sys/fs/nfs/common/bootp_subr.c
808
ifctx->call.secs = htons(gctx->secs);
sys/fs/nfs/common/krpc_subr.c
149
*portp = htons(PMAPPORT);
sys/fs/nfs/common/krpc_subr.c
163
sin->sin_port = htons(PMAPPORT);
sys/fs/nfs/common/krpc_subr.c
259
sin->sin_port = htons(tport);
sys/fs/nfs/common/nfs_commonsubs.c
4036
sad->sin_port = htons(portv);
sys/fs/nfs/common/nfs_commonsubs.c
4045
sad6->sin6_port = htons(portv);
sys/fs/nfs/common/nfs_diskless.c
275
nd3->root_saddr.sin_port = htons(NFS_PORT);
sys/fs/nfs/common/nfs_diskless.c
314
nd->root_saddr.sin_port = htons(NFS_PORT);
sys/fs/nfs/nlm/nlm_prot_impl.c
378
((struct sockaddr_in *)&ss)->sin_port = htons(111);
sys/fs/nfs/nlm/nlm_prot_impl.c
385
((struct sockaddr_in6 *)&ss)->sin6_port = htons(111);
sys/fs/nfs/nlm/nlm_prot_impl.c
475
htons(port);
sys/fs/nfs/nlm/nlm_prot_impl.c
481
htons(port);
sys/fs/nfs/server/nfs_nfsdstate.c
3948
rad->sin_port = htons(port.sval);
sys/kern/subr_tftproot.c
238
sin.sin_port = htons(IPPORT_TFTP);
sys/kern/subr_tftproot.c
261
tftp->th_opcode = htons((short)RRQ);
sys/kern/subr_tftproot.c
301
tftp->th_opcode = htons((short)ACK);
sys/kern/subr_tftproot.c
302
tftp->th_block = htons(trh->trh_block);
sys/lib/libsa/arp.c
137
ah->arp_hrd = htons(ARPHRD_ETHER);
sys/lib/libsa/arp.c
138
ah->arp_pro = htons(ETHERTYPE_IP);
sys/lib/libsa/arp.c
141
ah->arp_op = htons(ARPOP_REQUEST);
sys/lib/libsa/arp.c
221
if (ah->arp_hrd != htons(ARPHRD_ETHER) ||
sys/lib/libsa/arp.c
222
ah->arp_pro != htons(ETHERTYPE_IP) ||
sys/lib/libsa/arp.c
233
if (ah->arp_op == htons(ARPOP_REQUEST)) {
sys/lib/libsa/arp.c
242
if (ah->arp_op != htons(ARPOP_REPLY)) {
sys/lib/libsa/arp.c
279
if (arp->arp_hrd != htons(ARPHRD_ETHER) ||
sys/lib/libsa/arp.c
280
arp->arp_pro != htons(ETHERTYPE_IP) ||
sys/lib/libsa/arp.c
291
if (arp->arp_op != htons(ARPOP_REQUEST)) {
sys/lib/libsa/arp.c
309
arp->arp_op = htons(ARPOP_REPLY);
sys/lib/libsa/bootp.c
170
d->myport = htons(IPPORT_BOOTPC);
sys/lib/libsa/bootp.c
172
d->destport = htons(IPPORT_BOOTPS);
sys/lib/libsa/bootp.c
292
bp->bp_secs = htons((u_short)(getsecs() - bot));
sys/lib/libsa/bootparam.c
162
d->myport = (uint16_t)htons((uint16_t)rpc_port);
sys/lib/libsa/bootparam.c
279
d->myport = htons((uint16_t)rpc_port);
sys/lib/libsa/ether.c
76
eh->ether_type = htons(etype);
sys/lib/libsa/ip.c
139
if (ah->ar_op == htons(ARPOP_REQUEST)) {
sys/lib/libsa/ip.c
96
ip->ip_len = htons(len);
sys/lib/libsa/nfs.c
564
desc->myport = htons(--rpc_port);
sys/lib/libsa/rarp.c
120
ap->arp_hrd = htons(ARPHRD_ETHER);
sys/lib/libsa/rarp.c
121
ap->arp_pro = htons(ETHERTYPE_IP);
sys/lib/libsa/rarp.c
124
ap->arp_op = htons(ARPOP_REVREQUEST);
sys/lib/libsa/rarp.c
205
if (ap->arp_hrd != htons(ARPHRD_ETHER) ||
sys/lib/libsa/rarp.c
206
ap->arp_pro != htons(ETHERTYPE_IP) ||
sys/lib/libsa/rarp.c
217
if (ap->arp_op != htons(ARPOP_REVREPLY)) {
sys/lib/libsa/rpc.c
138
d->destport = htons(port);
sys/lib/libsa/tftp.c
165
wbuf.t.th_opcode = htons((u_short)RRQ);
sys/lib/libsa/tftp.c
176
h->iodesc->myport = htons(tftpport + (getsecs() & 0x3ff));
sys/lib/libsa/tftp.c
177
h->iodesc->destport = htons(IPPORT_TFTP);
sys/lib/libsa/tftp.c
206
wbuf.t.th_opcode = htons((u_short)ACK);
sys/lib/libsa/tftp.c
207
wbuf.t.th_block = htons((u_short)h->currblock);
sys/lib/libsa/tftp.c
239
wbuf.t.th_opcode = htons((u_short)ACK);
sys/lib/libsa/tftp.c
240
wbuf.t.th_block = htons((u_short)h->currblock);
sys/lib/libsa/tftp.c
242
wbuf.t.th_opcode = htons((u_short)ERROR);
sys/lib/libsa/tftp.c
243
wbuf.t.th_code = htons((u_short)ENOSPACE); /* ??? */
sys/lib/libsa/udp.c
91
uh->uh_ulen = htons(len);
sys/net/bridgestp.c
242
bpdu.cbu_protoid = htons(0);
sys/net/bridgestp.c
248
bpdu.cbu_rootpri = htons(cu->cu_rootid >> 48);
sys/net/bridgestp.c
258
bpdu.cbu_bridgepri = htons(cu->cu_rootid >> 48);
sys/net/bridgestp.c
266
bpdu.cbu_portid = htons(cu->cu_port_id);
sys/net/bridgestp.c
267
bpdu.cbu_messageage = htons(cu->cu_message_age);
sys/net/bridgestp.c
268
bpdu.cbu_maxage = htons(cu->cu_max_age);
sys/net/bridgestp.c
269
bpdu.cbu_hellotime = htons(cu->cu_hello_time);
sys/net/bridgestp.c
270
bpdu.cbu_forwarddelay = htons(cu->cu_forward_delay);
sys/net/bridgestp.c
274
eh->ether_type = htons(sizeof(bpdu));
sys/net/bridgestp.c
385
eh->ether_type = htons(sizeof(bpdu));
sys/net/ether_sw_offload.c
190
switch (htons(eh->ether_type)) {
sys/net/ether_sw_offload.c
287
htons((uint16_t)len + proto));
sys/net/if_arcsubr.c
180
arph->ar_hrd = htons(ARPHRD_ARCNET);
sys/net/if_arcsubr.c
190
atype = htons(ARCTYPE_REVARP);
sys/net/if_arcsubr.c
198
atype = htons(ARCTYPE_ARP);
sys/net/if_arcsubr.c
201
atype = htons(ARCTYPE_ARP_OLD);
sys/net/if_arcsubr.c
227
atype = htons(ARCTYPE_INET6);
sys/net/if_arcsubr.c
542
mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
sys/net/if_arcsubr.c
550
mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
sys/net/if_bridge.c
2740
ether_type = htons(llc2->llc_un.type_snap.ether_type);
sys/net/if_ethersubr.c
1031
evl.evl_encap_proto = htons(ETHERTYPE_VLAN);
sys/net/if_ethersubr.c
1032
evl.evl_tag = htons(vlan_get_tag(m));
sys/net/if_ethersubr.c
1865
evl->evl_encap_proto = htons(etype);
sys/net/if_ethersubr.c
1866
evl->evl_tag = htons(tag);
sys/net/if_ethersubr.c
296
etype = htons(ETHERTYPE_IP);
sys/net/if_ethersubr.c
314
ah->ar_hrd = htons(ARPHRD_ETHER);
sys/net/if_ethersubr.c
319
etype = htons(ETHERTYPE_REVARP);
sys/net/if_ethersubr.c
325
etype = htons(ETHERTYPE_ARP);
sys/net/if_ethersubr.c
343
etype = htons(ETHERTYPE_IPV6);
sys/net/if_ethersubr.c
389
llc.llc_snap_ether_type = htons(ETHERTYPE_ATALK);
sys/net/if_ethersubr.c
392
etype = htons(ETHERTYPE_ATALK);
sys/net/if_ethersubr.c
426
etype = htons(ETHERTYPE_MPLS);
sys/net/if_ethersubr.c
441
etype = htons(m->m_pkthdr.len);
sys/net/if_ethersubr.c
530
ether_type = htons(eh->ether_type);
sys/net/if_ethersubr.c
545
ether_type = htons(llc->llc_un.type_snap.ether_type);
sys/net/if_gre.c
897
etype = htons(ETHERTYPE_IP);
sys/net/if_gre.c
902
etype = htons(ETHERTYPE_ATALK);
sys/net/if_gre.c
907
etype = htons(ETHERTYPE_IPV6);
sys/net/if_gre.c
922
etype = htons(ETHERTYPE_MPLS);
sys/net/if_ieee1394subr.c
145
etype = htons(ETHERTYPE_IP);
sys/net/if_ieee1394subr.c
149
ah->ar_hrd = htons(ARPHRD_IEEE1394);
sys/net/if_ieee1394subr.c
150
etype = htons(ETHERTYPE_ARP);
sys/net/if_ieee1394subr.c
171
etype = htons(ETHERTYPE_IPV6);
sys/net/if_ieee1394subr.c
276
ifh->ifh_ft_size = htons(IEEE1394_FT_MORE | (totlen - 1));
sys/net/if_ieee1394subr.c
278
ifh->ifh_dgl = htons(ic->ic_dgl);
sys/net/if_ieee1394subr.c
293
htons(IEEE1394_FT_SUBSEQ | IEEE1394_FT_MORE | (totlen - 1));
sys/net/if_ieee1394subr.c
294
ifh->ifh_etype_off = htons(off);
sys/net/if_ieee1394subr.c
295
ifh->ifh_dgl = htons(ic->ic_dgl);
sys/net/if_ieee1394subr.c
307
ifh->ifh_ft_size &= ~htons(IEEE1394_FT_MORE); /* last fragment */
sys/net/if_ieee1394subr.c
368
h.ibh_type = htons(etype);
sys/net/if_pppoe.c
1267
eh->ether_type = htons(etype);
sys/net/if_pppoe.c
1846
eh->ether_type = htons(ETHERTYPE_PPPOEDISC);
sys/net/if_spppsubr.c
1007
protocol = htons(PPP_IPV6);
sys/net/if_spppsubr.c
1507
*mtod(m, uint16_t *) = htons(proto);
sys/net/if_spppsubr.c
1514
h->protocol = htons(proto); /* Link Control Protocol */
sys/net/if_spppsubr.c
1519
lh->len = htons(LCP_HEADER_LEN + len);
sys/net/if_spppsubr.c
4223
desiredaddr.s6_addr16[0] = htons(0xfe80);
sys/net/if_spppsubr.c
4430
suggestaddr.s6_addr16[0] = htons(0xfe80);
sys/net/if_spppsubr.c
5299
*mtod(m, uint16_t *) = htons(cp->proto);
sys/net/if_spppsubr.c
5307
h->protocol = htons(cp->proto);
sys/net/if_spppsubr.c
5335
lh->len = htons(LCP_HEADER_LEN + len);
sys/net/if_spppsubr.c
705
uint16_t prot = htons(protocol);
sys/net/if_spppsubr.c
980
protocol = htons(PPP_IP);
sys/net/if_stf.c
431
ip->ip_len = htons(m->m_pkthdr.len);
sys/net/if_wg.c
3781
sin->sin_port = htons(port);
sys/net/if_wg.c
3793
sin6->sin6_port = htons(port);
sys/net/lagg/if_lagg_lacp.c
1253
eh->ether_type == htons(ETHERTYPE_SLOWPROTOCOLS)) {
sys/net/lagg/if_lagg_lacp.c
1408
du->ldu_eh.ether_type = htons(ETHERTYPE_SLOWPROTOCOLS);
sys/net/lagg/if_lagg_lacp.c
1594
(unsigned int)htons(key));
sys/net/lagg/if_lagg_lacp.c
1703
pi->lpi_portno = htons(LACP_PORTNO_NONE);
sys/net/lagg/if_lagg_lacp.c
1704
pi->lpi_portprio = htons(0xffff);
sys/net/lagg/if_lagg_lacp.c
1819
lacpp->lp_actor.lpi_portno = htons(if_get_index(lp->lp_ifp));
sys/net/lagg/if_lagg_lacp.c
1820
lacpp->lp_actor.lpi_portprio = htons(LACP_PORT_PRIO);
sys/net/lagg/if_lagg_lacp.c
483
lsc->lsc_key = htons(if_get_index(&sc->sc_if));
sys/net/lagg/if_lagg_lacp.c
484
lsc->lsc_system_prio = htons(LACP_SYSTEM_PRIO);
sys/net/lagg/if_lagg_lacp.c
722
lacpp->lp_actor.lpi_portprio = htons(prio);
sys/net/npf/npf_ext_normalize.c
123
if (np->n_no_df && (ip_off & htons(IP_DF)) != 0) {
sys/net/npf/npf_ext_normalize.c
124
uint16_t nip_off = ip_off & ~htons(IP_DF);
sys/net/npf/npf_ext_normalize.c
182
maxmss = htons(maxmss);
sys/net/npf/npf_inet.c
452
if (ip->ip_off & ~htons(IP_DF | IP_RF)) {
sys/net/npf/npf_portmap.c
535
return htons(bit);
sys/net/npf/npf_sendpkt.c
145
ip->ip_len = htons(sizeof(struct tcphdr));
sys/net/npf/npf_sendpkt.c
159
ip6->ip6_plen = htons(len);
sys/net/npf/npf_sendpkt.c
187
ip->ip_len = htons(len);
sys/net/slcompress.c
157
(f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
sys/net/slcompress.c
160
(f) = htons(ntohs(f) + (uint32_t)*cp++); \
sys/net/slcompress.c
166
(f) = htons((cp[1] << 8) | cp[2]); \
sys/net/slcompress.c
169
(f) = htons((uint32_t)*cp++); \
sys/net/slcompress.c
192
if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40)
sys/net/slcompress.c
547
th->th_sum = htons((*cp << 8) | cp[1]);
sys/net/slcompress.c
585
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
sys/net/slcompress.c
601
cs->cs_ip.ip_len = htons(total_len);
sys/net/toeplitz.c
221
uint16_t skey = htons(stoeplitz_keyseed);
sys/net80211/ieee80211_input.c
1041
eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));
sys/net80211/ieee80211_input.c
341
if (eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/net80211/ieee80211_input.c
356
key == NULL && eh->ether_type != htons(ETHERTYPE_PAE)) {
sys/net80211/ieee80211_output.c
340
if (eh->ether_type == htons(ETHERTYPE_IP)) {
sys/net80211/ieee80211_output.c
562
if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) {
sys/net80211/ieee80211_output.c
583
eh.ether_type != htons(ETHERTYPE_PAE);
sys/net80211/ieee80211_output.c
687
if (eh.ether_type != htons(ETHERTYPE_PAE) ||
sys/netatalk/aarp.c
181
ea->aarp_hrd = htons(AARPHRD_ETHER);
sys/netatalk/aarp.c
182
ea->aarp_pro = htons(ETHERTYPE_ATALK);
sys/netatalk/aarp.c
185
ea->aarp_op = htons(AARPOP_REQUEST);
sys/netatalk/aarp.c
213
llc->llc_ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/aarp.c
224
eh->ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/aarp.c
506
llc->llc_ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/aarp.c
512
eh->ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/aarp.c
517
ea->aarp_op = htons(AARPOP_RESPONSE);
sys/netatalk/aarp.c
627
ea->aarp_hrd = htons(AARPHRD_ETHER);
sys/netatalk/aarp.c
628
ea->aarp_pro = htons(ETHERTYPE_ATALK);
sys/netatalk/aarp.c
631
ea->aarp_op = htons(AARPOP_PROBE);
sys/netatalk/aarp.c
650
llc->llc_ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/aarp.c
661
eh->ether_type = htons(ETHERTYPE_AARP);
sys/netatalk/at_control.c
509
AA_SAT(aa)->sat_addr.s_net = htons(net);
sys/netatalk/at_control.c
615
aa->aa_broadaddr.sat_addr.s_net = htons(ATADDR_ANYNET);
sys/netatalk/at_control.c
739
mask.s_net = htons(~mask1);
sys/netatalk/at_control.c
740
addr.s_net = htons(bot);
sys/netinet/dccp_usrreq.c
1488
ip->ip_len = htons(hdrlen + len);
sys/netinet/dccp_usrreq.c
324
ip->ip_len = htons(m->m_pkthdr.len);
sys/netinet/dccp_var.h
40
(x)->dh_seq = htons(y >> 32);\
sys/netinet/dccp_var.h
49
(x).dah_ack = htons(y >> 32);\
sys/netinet/if_arp.c
1178
ah->ar_op = htons(ARPOP_REPLY);
sys/netinet/if_arp.c
1179
ah->ar_pro = htons(ETHERTYPE_IP); /* let's be sure! */
sys/netinet/if_arp.c
1945
ah->ar_pro = htons(ETHERTYPE_IP);
sys/netinet/if_arp.c
1948
ah->ar_op = htons(ARPOP_REVREQUEST);
sys/netinet/if_arp.c
545
ah->ar_hrd = htons(ARPHRD_IEEE1394);
sys/netinet/if_arp.c
551
ah->ar_pro = htons(ETHERTYPE_IP);
sys/netinet/if_arp.c
554
ah->ar_op = htons(ARPOP_REQUEST);
sys/netinet/igmp.c
614
ip->ip_len = htons(sizeof(struct ip) + IGMP_MINLEN);
sys/netinet/igmp.c
615
ip->ip_off = htons(0);
sys/netinet/in_gif.c
160
iphdr.ip_len = htons(m->m_pkthdr.len + sizeof(struct ip));
sys/netinet/in_offload.c
110
ip->ip_len = htons(iphlen + thlen + mss);
sys/netinet/in_offload.c
112
htons((uint16_t)(thlen + mss) + IPPROTO_TCP));
sys/netinet/in_offload.c
146
ip->ip_id = htons(ipid);
sys/netinet/in_pcb.c
309
lport = htons(lport);
sys/netinet/in_var.h
479
id = htons(ip_id);
sys/netinet/ip_carp.c
1082
ip->ip_len = htons(len);
sys/netinet/ip_carp.c
1084
ip->ip_off = htons(IP_DF);
sys/netinet/ip_carp.c
1188
ip6->ip6_dst.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_carp.c
1989
addr6.sin6_addr.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_carp.c
1990
addr6.sin6_addr.s6_addr16[1] = htons(sc->sc_if.if_index);
sys/netinet/ip_carp.c
1998
addr6.sin6_addr.s6_addr16[0] = htons(0xff02);
sys/netinet/ip_carp.c
1999
addr6.sin6_addr.s6_addr16[1] = htons(sc->sc_if.if_index);
sys/netinet/ip_flow.c
306
if (ip->ip_sum >= (u_int16_t) ~htons(IPTTLDEC << 8))
sys/netinet/ip_flow.c
307
ip->ip_sum -= ~htons(IPTTLDEC << 8);
sys/netinet/ip_flow.c
309
ip->ip_sum += htons(IPTTLDEC << 8);
sys/netinet/ip_icmp.c
277
if (oip->ip_off &~ htons(IP_MF|IP_DF))
sys/netinet/ip_icmp.c
367
icp->icmp_nextmtu = htons(destmtu);
sys/netinet/ip_icmp.c
379
nip->ip_len = htons(m->m_len);
sys/netinet/ip_icmp.c
381
nip->ip_off = htons(0);
sys/netinet/ip_icmp.c
911
ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
sys/netinet/ip_input.c
756
if (ip->ip_off & ~htons(IP_DF|IP_RF)) {
sys/netinet/ip_mroute.c
1788
ip_copy->ip_len = htons(len);
sys/netinet/ip_mroute.c
2904
ip_outer->ip_len = htons(len + sizeof(pim_encap_iphdr) +
sys/netinet/ip_mroute.c
2914
ip_outer->ip_off |= htons(IP_DF);
sys/netinet/ip_output.c
1043
ip->ip_len = htons(ntohs(ip->ip_len) + optlen);
sys/netinet/ip_output.c
280
ip->ip_off = htons(0);
sys/netinet/ip_output.c
623
ip->ip_off |= htons(IP_DF);
sys/netinet/ip_output.c
908
mhip->ip_len = htons((u_int16_t)(len + mhlen));
sys/netinet/ip_output.c
945
ip->ip_len = htons((u_int16_t)m->m_pkthdr.len);
sys/netinet/ip_output.c
946
ip->ip_off |= htons(IP_MF);
sys/netinet/ip_reass.c
404
ip->ip_len = htons((ip->ip_hl << 2) + next);
sys/netinet/ip_reass.c
405
ip->ip_off = htons(0);
sys/netinet/ip_reass.c
650
mff = (ip->ip_off & htons(IP_MF)) != 0;
sys/netinet/portalgo.c
264
pcb = inpcb_lookup_local(table, sin.sin_addr, htons(port), 1,
sys/netinet/portalgo.c
320
htons(port), wild, &vestigial);
sys/netinet/portalgo.c
330
htons(port), wild, &vestigial);
sys/netinet/raw_ip.c
335
ip->ip_off = htons(0);
sys/netinet/raw_ip.c
337
ip->ip_len = htons(m->m_pkthdr.len);
sys/netinet/sctp_asconf.c
1219
if (htons(eh->length) + sizeof(struct sctp_error_cause) >
sys/netinet/sctp_asconf.c
1220
htons(aph->ph.param_length)) {
sys/netinet/sctp_asconf.c
1229
if (htons(ph->param_length) + sizeof(struct sctp_paramhdr) >
sys/netinet/sctp_asconf.c
1230
htons(eh->length)) {
sys/netinet/sctp_asconf.c
136
aph->ph.param_type = htons(SCTP_SUCCESS_REPORT);
sys/netinet/sctp_asconf.c
139
aph->ph.param_length = htons(aph->ph.param_length);
sys/netinet/sctp_asconf.c
166
aph->ph.param_type = htons(SCTP_ERROR_CAUSE_IND);
sys/netinet/sctp_asconf.c
167
error->code = htons(cause);
sys/netinet/sctp_asconf.c
189
error->length = htons(error->length);
sys/netinet/sctp_asconf.c
190
aph->ph.param_length = htons(aph->ph.param_length);
sys/netinet/sctp_asconf.c
2322
htons(aa->ap.addrp.ph.param_type);
sys/netinet/sctp_asconf.c
2332
lookup->ph.param_length = htons(SCTP_SIZE32(p_size));
sys/netinet/sctp_asconf.c
2345
aph->ph.param_type = htons(aph->ph.param_type);
sys/netinet/sctp_asconf.c
2346
aph->ph.param_length = htons(aph->ph.param_length);
sys/netinet/sctp_asconf.c
2347
aap->addrp.ph.param_type = htons(aap->addrp.ph.param_type);
sys/netinet/sctp_asconf.c
2348
aap->addrp.ph.param_length = htons(aap->addrp.ph.param_length);
sys/netinet/sctp_asconf.c
2378
htons(SCTP_IPV6_ADDRESS);
sys/netinet/sctp_asconf.c
2386
htons(SCTP_IPV4_ADDRESS);
sys/netinet/sctp_asconf.c
2392
lookup->ph.param_length = htons(SCTP_SIZE32(p_size));
sys/netinet/sctp_asconf.c
2403
lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS);
sys/netinet/sctp_asconf.c
2404
lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)));
sys/netinet/sctp_asconf.c
798
ack_cp->ch.chunk_length = htons(ack_cp->ch.chunk_length);
sys/netinet/sctp_indata.c
1085
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1086
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_indata.c
1115
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1116
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_indata.c
1145
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1147
htons(oper->m_len);
sys/netinet/sctp_indata.c
1176
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1178
htons(oper->m_len);
sys/netinet/sctp_indata.c
1274
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1276
htons(oper->m_len);
sys/netinet/sctp_indata.c
1310
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1312
htons(oper->m_len);
sys/netinet/sctp_indata.c
1348
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1350
htons(oper->m_len);
sys/netinet/sctp_indata.c
1382
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1384
htons(oper->m_len);
sys/netinet/sctp_indata.c
1427
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1429
htons(oper->m_len);
sys/netinet/sctp_indata.c
1464
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1466
htons(oper->m_len);
sys/netinet/sctp_indata.c
1500
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1502
htons(oper->m_len);
sys/netinet/sctp_indata.c
1538
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1540
htons(oper->m_len);
sys/netinet/sctp_indata.c
1810
phdr->param_type = htons(SCTP_CAUSE_INV_STRM);
sys/netinet/sctp_indata.c
1812
htons(sizeof(struct sctp_paramhdr) * 2);
sys/netinet/sctp_indata.c
1858
ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
1859
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_indata.c
2069
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
2070
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_indata.c
2093
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
2095
htons(oper->m_len);
sys/netinet/sctp_indata.c
2127
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
2129
htons(oper->m_len);
sys/netinet/sctp_indata.c
2604
htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
2605
ph->param_length = htons(op_err->m_len);
sys/netinet/sctp_indata.c
3572
ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
3573
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_indata.c
854
ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_indata.c
855
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_input.c
1078
ph->param_type = htons(SCTP_CAUSE_COOKIE_IN_SHUTDOWN);
sys/netinet/sctp_input.c
1079
ph->param_length = htons(sizeof(struct sctp_paramhdr));
sys/netinet/sctp_input.c
1949
scm->ph.param_type = htons(SCTP_CAUSE_STALE_COOKIE);
sys/netinet/sctp_input.c
1950
scm->ph.param_length = htons((sizeof(struct sctp_paramhdr) +
sys/netinet/sctp_input.c
3225
htons(SCTP_CAUSE_OUT_OF_RESC);
sys/netinet/sctp_input.c
3227
htons(sizeof(struct sctp_paramhdr));
sys/netinet/sctp_input.c
3501
htons(SCTP_CAUSE_OUT_OF_RESC);
sys/netinet/sctp_input.c
3503
htons(sizeof(struct sctp_paramhdr));
sys/netinet/sctp_input.c
3704
htons(SCTP_CAUSE_UNRECOG_CHUNK);
sys/netinet/sctp_input.c
3706
htons(chk_length + sizeof(*phd));
sys/netinet/sctp_input.c
375
htons(sizeof(struct sctp_inv_mandatory_param) - 2);
sys/netinet/sctp_input.c
377
mp->param = htons(SCTP_STATE_COOKIE);
sys/netinet/sctp_output.c
204
parmh->param_type = htons(SCTP_IPV4_ADDRESS);
sys/netinet/sctp_output.c
205
parmh->param_length = htons(len);
sys/netinet/sctp_output.c
213
parmh->param_type = htons(SCTP_IPV6_ADDRESS);
sys/netinet/sctp_output.c
2130
ip->ip_off = htons(IP_DF);
sys/netinet/sctp_output.c
2134
ip->ip_id = htons(ip_newid());
sys/netinet/sctp_output.c
2136
ip->ip_len = htons(m->m_pkthdr.len);
sys/netinet/sctp_output.c
214
parmh->param_length = htons(len);
sys/netinet/sctp_output.c
263
ph->param_type = htons(SCTP_STATE_COOKIE);
sys/netinet/sctp_output.c
2648
initm->msg.init.num_outbound_streams = htons(stcb->asoc.pre_open_streams);
sys/netinet/sctp_output.c
2649
initm->msg.init.num_inbound_streams = htons(stcb->asoc.max_inbound_streams);
sys/netinet/sctp_output.c
2654
sup_addr->ph.param_type = htons(SCTP_SUPPORTED_ADDRTYPE);
sys/netinet/sctp_output.c
2656
sup_addr->ph.param_length = htons(sizeof(*sup_addr) +
sys/netinet/sctp_output.c
2658
sup_addr->addr_type[0] = htons(SCTP_IPV4_ADDRESS);
sys/netinet/sctp_output.c
2659
sup_addr->addr_type[1] = htons(SCTP_IPV6_ADDRESS);
sys/netinet/sctp_output.c
2667
ali->ph.param_type = htons(SCTP_ULP_ADAPTION);
sys/netinet/sctp_output.c
2668
ali->ph.param_length = htons(sizeof(*ali));
sys/netinet/sctp_output.c
2682
cookie_preserve->ph.param_type = htons(SCTP_COOKIE_PRESERVE);
sys/netinet/sctp_output.c
2683
cookie_preserve->ph.param_length = htons(
sys/netinet/sctp_output.c
2694
ecn->ph.param_type = htons(SCTP_ECN_CAPABLE);
sys/netinet/sctp_output.c
2695
ecn->ph.param_length = htons(sizeof(*ecn));
sys/netinet/sctp_output.c
2703
prsctp->ph.param_type = htons(SCTP_PRSCTP_SUPPORTED);
sys/netinet/sctp_output.c
2704
prsctp->ph.param_length = htons(sizeof(*prsctp));
sys/netinet/sctp_output.c
2712
pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT);
sys/netinet/sctp_output.c
2713
pr_supported->ph.param_length = htons(sizeof(*pr_supported) + SCTP_EXT_COUNT);
sys/netinet/sctp_output.c
2729
ecn_nonce->ph.param_type = htons(SCTP_ECN_NONCE_SUPPORTED);
sys/netinet/sctp_output.c
2730
ecn_nonce->ph.param_length = htons(sizeof(*ecn_nonce));
sys/netinet/sctp_output.c
2850
initm->msg.ch.chunk_length = htons((m->m_pkthdr.len -
sys/netinet/sctp_output.c
3003
s.param_type = htons(SCTP_CAUSE_UNRESOLV_ADDR);
sys/netinet/sctp_output.c
3004
s.param_length = htons(sizeof(s) + plen);
sys/netinet/sctp_output.c
3057
s.param_type = htons(SCTP_UNRECOG_PARAM);
sys/netinet/sctp_output.c
3058
s.param_length = htons(sizeof(s) + plen);
sys/netinet/sctp_output.c
313
ph->param_length = htons(cookie_sz);
sys/netinet/sctp_output.c
3623
initackm_out->msg.init.num_outbound_streams = htons(i_want);
sys/netinet/sctp_output.c
3627
htons(inp->sctp_ep.max_open_streams_intome);
sys/netinet/sctp_output.c
3635
ali->ph.param_type = htons(SCTP_ULP_ADAPTION);
sys/netinet/sctp_output.c
3636
ali->ph.param_length = htons(sizeof(*ali));
sys/netinet/sctp_output.c
3648
ecn->ph.param_type = htons(SCTP_ECN_CAPABLE);
sys/netinet/sctp_output.c
3649
ecn->ph.param_length = htons(sizeof(*ecn));
sys/netinet/sctp_output.c
3658
prsctp->ph.param_type = htons(SCTP_PRSCTP_SUPPORTED);
sys/netinet/sctp_output.c
3659
prsctp->ph.param_length = htons(sizeof(*prsctp));
sys/netinet/sctp_output.c
3667
pr_supported->ph.param_type = htons(SCTP_SUPPORTED_CHUNK_EXT);
sys/netinet/sctp_output.c
3668
pr_supported->ph.param_length = htons(sizeof(*pr_supported) + SCTP_EXT_COUNT);
sys/netinet/sctp_output.c
3683
ecn_nonce->ph.param_type = htons(SCTP_ECN_NONCE_SUPPORTED);
sys/netinet/sctp_output.c
3684
ecn_nonce->ph.param_length = htons(sizeof(*ecn_nonce));
sys/netinet/sctp_output.c
3836
initackm_out->msg.ch.chunk_length = htons(sz_of);
sys/netinet/sctp_output.c
4174
ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT);
sys/netinet/sctp_output.c
4175
ph->param_length = htons(m->m_len);
sys/netinet/sctp_output.c
5042
dchkh->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
5113
dchkh->dp.stream_id = htons(strq->stream_no);
sys/netinet/sctp_output.c
5114
dchkh->dp.stream_sequence = htons(chk->rec.data.stream_seq);
sys/netinet/sctp_output.c
6019
hdr->chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
6223
hdr->chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
6269
ack_cp->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
6314
shutdown_cp->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
7607
fwdtsn->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
7897
sack->sack.num_gap_ack_blks = htons(num_gap_blocks);
sys/netinet/sctp_output.c
7898
sack->sack.num_dup_tsns = htons(asoc->numduptsns);
sys/netinet/sctp_output.c
7904
sack->ch.chunk_length = htons(a_chk->send_size);
sys/netinet/sctp_output.c
7918
gap_descriptor->end = htons(((uint16_t)(i-start)));
sys/netinet/sctp_output.c
7925
gap_descriptor->start = htons(((uint16_t)(i+1-start)));
sys/netinet/sctp_output.c
7935
gap_descriptor->end = htons(((uint16_t)((i-start))));
sys/netinet/sctp_output.c
7983
abort_m->msg.ch.chunk_length = htons(sizeof(struct sctp_abort_chunk) +
sys/netinet/sctp_output.c
8016
comp_cp->shut_cmp.ch.chunk_length = htons(sizeof(struct sctp_shutdown_complete_chunk));
sys/netinet/sctp_output.c
8106
comp_cp->shut_cmp.ch.chunk_length = htons(sizeof(struct sctp_shutdown_complete_chunk));
sys/netinet/sctp_output.c
8131
iph_out->ip_len = htons(mout->m_pkthdr.len);
sys/netinet/sctp_output.c
8345
hb->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
8347
hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO);
sys/netinet/sctp_output.c
8348
hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param));
sys/netinet/sctp_output.c
8470
ecne->ch.chunk_length = htons(sizeof(struct sctp_ecne_chunk));
sys/netinet/sctp_output.c
8518
len = chk->send_size = htons(ip6h->ip6_plen);
sys/netinet/sctp_output.c
8561
drp->trunc_len = htons(chk->send_size);
sys/netinet/sctp_output.c
8569
drp->trunc_len = htons(0);
sys/netinet/sctp_output.c
8587
drp->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
8653
cwr->ch.chunk_length = htons(sizeof(struct sctp_cwr_chunk));
sys/netinet/sctp_output.c
8746
strack->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
8751
strack->sr_resp.ph.param_length = htons((chk->send_size - sizeof(struct sctp_chunkhdr)));
sys/netinet/sctp_output.c
8899
strreq->ch.chunk_length = htons(chk->send_size);
sys/netinet/sctp_output.c
8902
strreq->sr_req.ph.param_length = htons((chk->send_size - sizeof(struct sctp_chunkhdr)));
sys/netinet/sctp_output.c
8935
strreq->sr_req.list_of_streams[i] = htons(list[i]);
sys/netinet/sctp_output.c
9040
abm->msg.ch.chunk_length = htons(sizeof(abm->msg.ch) + err_len);
sys/netinet/sctp_output.c
9043
abm->msg.ch.chunk_length = htons(sizeof(abm->msg.ch));
sys/netinet/sctp_output.c
9068
iph_out->ip_len = htons(mout->m_pkthdr.len);
sys/netinet/sctp_output.c
9122
ophdr->chunk_length = htons(scm->m_pkthdr.len - sizeof(struct sctphdr));
sys/netinet/sctp_output.c
9156
out->ip_len = htons(scm->m_pkthdr.len);
sys/netinet/sctp_output.c
9457
ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT);
sys/netinet/sctp_output.c
9458
ph->param_length = htons((sizeof(struct sctp_paramhdr) + tot_out));
sys/netinet/sctp_pcb.c
1779
if (sctp_isport_inuse(inp, htons(port_attempt)) == 0) {
sys/netinet/sctp_pcb.c
1793
if (sctp_isport_inuse(inp, htons(port_attempt)) == 0) {
sys/netinet/sctp_pcb.c
1808
if (sctp_isport_inuse(inp, htons(port_attempt)) == 0) {
sys/netinet/sctp_pcb.c
1815
lport = htons(port_attempt);
sys/netinet/sctp_pcb.c
2066
ph->param_type = htons(
sys/netinet/sctp_pcb.c
2068
ph->param_length = htons(op_err->m_len);
sys/netinet/sctp_pcb.c
2163
ph->param_type = htons(
sys/netinet/sctp_pcb.c
2165
ph->param_length = htons(op_err->m_len);
sys/netinet/sctp_timer.c
200
ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_timer.c
201
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_timer.c
923
ph->param_type = htons(SCTP_CAUSE_PROTOCOL_VIOLATION);
sys/netinet/sctp_timer.c
924
ph->param_length = htons(oper->m_len);
sys/netinet/sctp_usrreq.c
733
ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT);
sys/netinet/sctp_usrreq.c
734
ph->param_length = htons(err->m_len);
sys/netinet/sctputil.c
3174
ph->param_length = htons(sizeof(struct sctp_paramhdr));
sys/netinet/sctputil.c
3175
ph->param_type = htons(err);
sys/netinet/tcp_input.c
3041
ippseudo.ippseudo_len = htons(m->m_pkthdr.len - thoff);
sys/netinet/tcp_input.c
3053
ip6pseudo.ip6ph_len = htons(m->m_pkthdr.len - thoff);
sys/netinet/tcp_input.c
910
htons(hw_csum + tlen + off + IPPROTO_TCP));
sys/netinet/tcp_output.c
1382
th->th_win = htons((u_int16_t) (win>>tp->rcv_scale));
sys/netinet/tcp_output.c
1390
th->th_urp = htons((u_int16_t)urp);
sys/netinet/tcp_output.c
1437
htons((u_int16_t) (len + optlen)));
sys/netinet/tcp_output.c
1453
htons((u_int16_t) (len + optlen)));
sys/netinet/tcp_output.c
1540
ip->ip_len = htons(m->m_pkthdr.len);
sys/netinet/tcp_subr.c
516
ipov->ih_len = htons(sizeof(struct tcphdr));
sys/netinet/tcp_subr.c
540
htons(sizeof(struct tcphdr) + IPPROTO_TCP));
sys/netinet/tcp_subr.c
550
ip6->ip6_plen = htons(sizeof(struct tcphdr));
sys/netinet/tcp_subr.c
776
th->th_win = htons((u_int16_t)win);
sys/netinet/tcp_subr.c
793
ipov->ih_len = htons((u_int16_t)tlen);
sys/netinet/tcp_subr.c
797
ip->ip_len = htons(hlen + tlen);
sys/netinet/tcp_subr.c
807
ip6->ip6_plen = htons(tlen);
sys/netinet/tcp_syncache.c
1168
th->th_win = htons(sc->sc_win);
sys/netinet/tcp_syncache.c
1312
ip->ip_len = htons(tlen - hlen);
sys/netinet/tcp_syncache.c
1315
ip->ip_len = htons(tlen);
sys/netinet/tcp_syncache.c
1321
ip6->ip6_plen = htons(tlen - hlen);
sys/netinet/tcp_syncache.c
1326
ip6->ip6_plen = htons(tlen - hlen);
sys/netinet/tcp_syncache.c
626
in6p_laddr(inp).s6_addr16[5] = htons(0xffff);
sys/netinet/udp_usrreq.c
1315
ip->ip_len = htons(ntohs(ip->ip_len) - skip);
sys/netinet/udp_usrreq.c
276
htons(hw_csum + len + IPPROTO_UDP));
sys/netinet/udp_usrreq.c
821
ui->ui_ulen = htons((u_int16_t)len + sizeof(struct udphdr));
sys/netinet/udp_usrreq.c
834
ui->ui_dst.s_addr, htons((u_int16_t)len +
sys/netinet/udp_usrreq.c
841
((struct ip *)ui)->ip_len = htons(sizeof(struct udpiphdr) + len);
sys/netinet6/frag6.c
474
ip6->ip6_plen = htons(next);
sys/netinet6/icmp6.c
1467
nni6->ni_flags = htons(0x0000); /* raw bitmap */
sys/netinet6/icmp6.c
2711
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
sys/netinet6/in6.c
814
llsol->s6_addr16[0] = htons(0xff02);
sys/netinet6/in6_gif.c
163
ip6->ip6_plen = htons((u_int16_t)m->m_pkthdr.len);
sys/netinet6/in6_ifattach.c
538
sa6->sin6_addr.s6_addr16[0] = htons(0xff02);
sys/netinet6/in6_offload.c
112
iph->ip6_plen = htons(thlen + mss);
sys/netinet6/in6_pcb.c
428
in6p_laddr(inp).s6_addr16[5] = htons(0xffff);
sys/netinet6/in6_pcb.c
464
mapped.s6_addr16[5] = htons(0xffff);
sys/netinet6/in6_src.c
880
inp->inp_lport = htons(lport);
sys/netinet6/ip6_output.c
358
ip6->ip6_plen = htons(plen);
sys/netinet6/ip6_output.c
978
ip6f->ip6f_offlg = htons((u_int16_t)((off - hlen) & ~7));
sys/netinet6/ip6_output.c
987
mhip6->ip6_plen = htons((u_int16_t)(len + hlen +
sys/netinet6/mld6.c
168
u_int16_t rtalert_code = htons((u_int16_t)IP6OPT_RTALERT_MLD);
sys/netinet6/nd6_nbr.c
1033
ip6->ip6_plen = htons((u_int16_t)icmp6len);
sys/netinet6/nd6_nbr.c
577
ip6->ip6_plen = htons((u_int16_t)icmp6len);
sys/netinet6/scope6.c
212
sin6->sin6_addr.s6_addr16[1] = htons(zoneid & 0xffff);
sys/netinet6/scope6.c
274
in6->s6_addr16[1] = htons(zoneid & 0xffff); /* XXX */
sys/netinet6/udp6_usrreq.c
1024
ui->ui_len = htons(plen);
sys/netinet6/udp6_usrreq.c
1036
ip->ip_len = htons(hlen + plen);
sys/netinet6/udp6_usrreq.c
1483
ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - skip);
sys/netinet6/udp6_usrreq.c
984
udp6->uh_ulen = htons((u_int16_t)plen);
sys/netinet6/udp6_usrreq.c
996
ip6->ip6_plen = htons((u_int16_t)plen);
sys/netipsec/ipsec.c
1031
htons((uint16_t)icmph.icmp6_type);
sys/netipsec/ipsec.c
1033
htons((uint16_t)icmph.icmp6_code);
sys/netipsec/ipsec.c
878
if (ip->ip_off & htons(IP_MF | IP_OFFMASK))
sys/netipsec/ipsec.c
886
if (ih.ip_off & htons(IP_MF | IP_OFFMASK))
sys/netipsec/ipsec.c
933
htons((uint16_t)icmph.icmp_type);
sys/netipsec/ipsec.c
935
htons((uint16_t)icmph.icmp_code);
sys/netipsec/ipsec_input.c
407
ip->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/ipsec_input.c
544
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
sys/netipsec/ipsec_output.c
201
udp->uh_ulen = htons(m->m_pkthdr.len - iphlen);
sys/netipsec/ipsec_output.c
211
ip->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/ipsec_output.c
229
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
sys/netipsec/ipsec_output.c
550
setdf = htons(setdf & IP_DF);
sys/netipsec/ipsec_output.c
568
ip->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/ipsec_output.c
604
ip->ip_off |= htons(IP_DF);
sys/netipsec/ipsec_output.c
724
ia2.s6_addr16[1] = htons(sa->sin6_scope_id);
sys/netipsec/ipsec_output.c
780
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6));
sys/netipsec/ipsecif.c
164
ip->ip_off = htons(0);
sys/netipsec/ipsecif.c
179
ip->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/ipsecif.c
587
ip6->ip6_plen = htons((u_short)m->m_pkthdr.len - sizeof(*ip6));
sys/netipsec/xform_ah.c
1054
iplen = htons(ntohs(iplen) + ahsize);
sys/netipsec/xform_ah.c
321
ip->ip_off = htons(ntohs(ip->ip_off) & ip4_ah_offsetmask);
sys/netipsec/xform_ah.c
324
ip->ip_off &= htons(IP_DF);
sys/netipsec/xform_ipcomp.c
575
ipcomp->comp_cpi = htons(cpi);
sys/netipsec/xform_ipcomp.c
585
mtod(m, struct ip *)->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/xform_ipcomp.c
591
htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
sys/netipsec/xform_ipip.c
370
ipo->ip_len = htons(m->m_pkthdr.len);
sys/netipsec/xform_ipip.c
393
ipo->ip_off &= ~ htons(IP_DF | IP_MF | IP_OFFMASK);
sys/netipsec/xform_ipip.c
456
ip6o->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6o));
sys/netipsec/xform_ipip.c
461
ip6o->ip6_dst.s6_addr16[1] = htons(saidx->dst.sin6.sin6_scope_id);
sys/netipsec/xform_ipip.c
463
ip6o->ip6_src.s6_addr16[1] = htons(saidx->src.sin6.sin6_scope_id);
sys/netmpls/mpls_ttl.c
173
mpls_icmp_ext.obj_hdr.length = htons(sizeof(union mpls_shim) +
sys/netmpls/mpls_ttl.c
191
if (oip->ip_off &~ htons(IP_MF|IP_DF))
sys/netmpls/mpls_ttl.c
275
icp->icmp_nextmtu = htons(destmtu);
sys/netmpls/mpls_ttl.c
302
nip->ip_len = htons(m->m_len);
sys/netmpls/mpls_ttl.c
304
nip->ip_off = htons(0);
sys/nfs/krpc_subr.c
154
*portp = htons(PMAPPORT);
sys/nfs/krpc_subr.c
168
sin->sin_port = htons(PMAPPORT);
sys/nfs/nfs_boot.c
417
sin.sin_port = htons(port);
sys/nfs/nfs_boot.c
655
if (port == htons(0))
sys/nfs/nfs_bootdhcp.c
315
bootp->bp_secs = htons(waited);
sys/nfs/nfs_bootdhcp.c
591
sin.sin_port = htons(IPPORT_BOOTPS);
sys/nfs/nfs_bootparam.c
334
bpsin->sin_port = htons(PMAPPORT);
sys/nfs/nfs_bootparam.c
358
bpsin->sin_port = htons(port);
sys/rump/net/lib/libwg/wg_user.c
401
u.sin.sin_port = htons(port);
sys/rump/net/lib/libwg/wg_user.c
410
u.sin6.sin6_port = htons(port);
sys/sys/endian.h
135
#define HTONS(x) (x) = htons(__CAST(uint16_t, (x)))
sys/sys/endian.h
71
uint16_t htons(uint16_t) __constfunc;
tests/lib/libc/net/h_dns_server.c
188
saddr.sin.sin_port = htons(53);
tests/lib/libc/net/h_dns_server.c
195
saddr.sin6.sin6_port = htons(53);
tests/lib/libc/net/h_servent.c
85
if ((svp = getservbyport(htons(atoi(port)), proto)) != NULL)
tests/lib/libc/sys/t_connect.c
62
sinlist.sin_port = htons(31522);
tests/lib/libc/sys/t_connect.c
76
sin.sin_port = htons(31522);
tests/lib/libc/sys/t_getrusage.c
183
sin.sin_port = htons(3333);
tests/lib/libc/sys/t_listen.c
59
sina.sin_port = htons(31522);
tests/lib/libc/sys/t_listen.c
63
sinb.sin_port = htons(31522);
tests/lib/libc/sys/t_stat.c
347
addr.sin_port = htons(42);
tests/lib/librumpclient/h_exec.c
79
sin.sin_port = htons(1234);
tests/lib/librumpclient/h_exec.c
83
sin.sin_port = htons(2345);
tests/lib/librumpclient/t_fd.c
126
sin.sin_port = htons(12345);
tests/lib/librumphijack/h_netget.c
74
sin.sin_port = htons(atoi(argv[2]));
tests/net/bpfilter/t_bpfilter.c
196
icmp->icmp_id = htons(37);
tests/net/bpfilter/t_bpfilter.c
197
icmp->icmp_seq = htons(1);
tests/net/config/netconfig.c
218
icmp.icmp_id = htons(37);
tests/net/config/netconfig.c
219
icmp.icmp_cksum = htons(0xf7da); /* precalc */
tests/net/icmp/t_forward.c
93
sin.sin_port = htons(33434);
tests/net/icmp/t_ping.c
166
icmp->icmp_id = htons(37);
tests/net/icmp/t_ping.c
182
icmp->icmp_seq = htons(loop);
tests/net/if_loop/t_pr.c
178
sin.sin_port = htons(12345);
tests/net/if_loop/t_pr.c
213
sin.sin_port = htons(12345);
tests/net/inpcb/broadcast_bind.c
44
sin.sin_port = htons(port);
tests/net/net/t_bind.c
100
sin->sin_port = htons(12345);
tests/net/net/t_bind.c
108
sin6->sin6_port = htons(12345);
tests/net/net/t_ip_reass.c
120
ip->ip_len = htons(sizeof(*ip) + payloadlen);
tests/net/net/t_ip_reass.c
255
ip->ip_off = htons(0x10);
tests/net/net/t_ip_reass.c
261
ip->ip_off = htons(0x20);
tests/net/net/t_ip_reass.c
267
ip->ip_off = htons(0x8);
tests/net/net/t_ip_reass.c
273
ip->ip_off = htons(0x10);
tests/net/net/t_ip_reass.c
285
packet2->hdr.ip_off = htons(IP_MF | 0x20);
tests/net/net/t_ip_reass.c
338
ip->ip_off = htons(IP_MF | 0x10);
tests/net/net/t_ip_reass.c
344
ip->ip_off = htons(0x10);
tests/net/net/t_ip_reass.c
397
ip->ip_off = htons(IP_MF | 0x1fff);
tests/net/net/t_ip_reass.c
403
ip->ip_off = htons(0x1fff);
tests/net/net/t_ip_reass.c
99
ip->ip_sum = htons((uint16_t)cksum);
tests/net/net/t_mapped.c
103
sin->sin_port = htons(12345);
tests/net/net/t_mapped.c
110
sin6->sin6_port = htons(12345);
tests/net/net/t_mapped.c
136
sin->sin_port = htons(12345);
tests/net/net/t_mapped.c
144
sin6->sin6_port = htons(12345);
tests/net/net/t_pktinfo_send.c
501
icmp.icmp_id = htons(getpid());
tests/net/net/t_pktinfo_send.c
532
icmp.icmp_id = htons(getpid());
tests/net/net/t_pktinfo_send.c
73
sin->sin_port = htons(port);
tests/net/net/t_socket_afinet.c
119
sin.sin_port = htons(6666);
tests/net/net/t_socket_afinet.c
148
sin.sin_port = htons(6666);
tests/net/net/t_socket_afinet.c
210
sin.sin_port = htons(6666);
tests/net/net/t_tcp.c
103
sin6->sin6_port = htons(0);
tests/net/net/t_tcp.c
97
sin->sin_port = htons(0);
tests/net/tcp/t_tcp_connect_port.c
317
saddr4.sin_port = htons(0);
tests/net/tcp/t_tcp_connect_port.c
349
saddr6.sin6_port = htons(0);
tests/net/tcp/tcp_shutdown.c
114
sin.sin_port = htons(31522);
tests/net/tcp/tcp_shutdown.c
80
sin.sin_port = htons(31522);
tests/rump/rumpkern/h_client/h_stresscli.c
52
sin.sin_port = htons(port);
tests/sys/netatalk/t_print.c
49
{ htons(3), 255 },
tests/sys/netinet/t_print.c
112
sin.sin_port = (in_port_t)htons(i);
tests/sys/netinet/t_print.c
126
sin.sin_port = (in_port_t)htons(i);
tests/sys/netinet6/t_print.c
121
sin6.sin6_port = (in_port_t)htons(i);
tests/sys/netinet6/t_print.c
136
sin6.sin6_port = (in_port_t)htons(i);
usr.bin/eject/am_glue.c
71
si.sin_port = htons(PMAPPORT);
usr.bin/fstat/fstat.c
949
sin.sin_port = htons(p);
usr.bin/fstat/fstat.c
988
sin6.sin6_port = htons(p);
usr.bin/ftp/ftp.c
1433
data_addr.su_port = htons(pack2(port, 0));
usr.bin/ftp/ftp.c
1469
data_addr.su_port = htons(pack2(port, 0));
usr.bin/ftp/ftp.c
1509
data_addr.su_port = htons(pack2(port, 0));
usr.bin/ftp/ftp.c
1545
data_addr.su_port = htons(port[1]);
usr.bin/getent/getent.c
799
se = getservbyport(htons(id), proto);
usr.bin/getnameinfo/getnameinfo.c
194
addr_in->sin_port = htons(port);
usr.bin/getnameinfo/getnameinfo.c
205
addr_in6->sin6_port = htons(port);
usr.bin/getnameinfo/getnameinfo.c
268
addr_at->sat_addr.s_net = htons((u_short)net);
usr.bin/getnameinfo/getnameinfo.c
270
addr_at->sat_port = htons((u_short)port);
usr.bin/mkcsmapper/yacc.y
229
u_int16_t oval = htons(val);
usr.bin/rlogin/rlogin.c
561
wp->ws_row = htons(winsize.ws_row);
usr.bin/rlogin/rlogin.c
562
wp->ws_col = htons(winsize.ws_col);
usr.bin/rlogin/rlogin.c
563
wp->ws_xpixel = htons(winsize.ws_xpixel);
usr.bin/rlogin/rlogin.c
564
wp->ws_ypixel = htons(winsize.ws_ypixel);
usr.bin/rpcinfo/rpcinfo.c
398
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
421
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
449
addr.sin_port = htons(portnum);
usr.bin/rpcinfo/rpcinfo.c
484
server_addr.sin_port = htons(PMAPPORT);
usr.bin/rsh/getport.c
64
sp->s_port = htons((uint16_t)port);
usr.bin/rump_dhcpclient/bpf.c
146
hw.ether_type = htons(protocol);
usr.bin/rump_dhcpclient/dhcp.c
579
dhcp->flags = htons(BROADCAST_FLAG);
usr.bin/rump_dhcpclient/dhcp.c
583
dhcp->secs = htons((uint16_t)UINT16_MAX);
usr.bin/rump_dhcpclient/dhcp.c
585
dhcp->secs = htons(up);
usr.bin/rump_dhcpclient/dhcp.c
643
sz = htons(sz);
usr.bin/rump_dhcpclient/net.c
394
sum = htons(sum);
usr.bin/rump_dhcpclient/net.c
429
udp->uh_sport = htons(DHCP_CLIENT_PORT);
usr.bin/rump_dhcpclient/net.c
430
udp->uh_dport = htons(DHCP_SERVER_PORT);
usr.bin/rump_dhcpclient/net.c
431
udp->uh_ulen = htons(sizeof(*udp) + length);
usr.bin/rump_dhcpclient/net.c
439
ip->ip_len = htons(sizeof(*ip) + sizeof(*udp) + length);
usr.bin/talk/get_names.c
114
msg.addr.sa_family = htons(AF_INET);
usr.bin/talk/get_names.c
115
msg.ctl_addr.sa_family = htons(AF_INET);
usr.bin/talk/invite.c
79
msg.addr.sa_family = htons(my_addr.sin_family);
usr.bin/talk/look_up.c
59
msg.ctl_addr.sa_family = htons(ctl_addr.sin_family);
usr.bin/tftp/tftp.c
178
s.sin_port = htons(mcport);
usr.bin/tftp/tftp.c
267
dp->th_opcode = htons((u_short)DATA);
usr.bin/tftp/tftp.c
268
dp->th_block = htons((u_short)block);
usr.bin/tftp/tftp.c
407
ap->th_opcode = htons((u_short)ACK);
usr.bin/tftp/tftp.c
408
ap->th_block = htons((u_short)(block));
usr.bin/tftp/tftp.c
491
ap->th_opcode = htons(ACK);
usr.bin/tftp/tftp.c
515
ap->th_opcode = htons((u_short)ACK); /* has seen err msg */
usr.bin/tftp/tftp.c
516
ap->th_block = htons((u_short)block);
usr.bin/tftp/tftp.c
542
tp->th_opcode = htons((u_short)request);
usr.bin/tftp/tftp.c
612
tp->th_opcode = htons((u_short)ERROR);
usr.bin/tftp/tftp.c
621
tp->th_code = htons((u_short)error);
usr.sbin/altq/libaltq/altq_qop.h
238
#define hton16(x) ((u_int16_t)htons((u_int16_t)(x)))
usr.sbin/altq/libaltq/parser.c
406
*port_no = htons(num);
usr.sbin/bootp/bootpd/bootpd.c
1088
send_addr.sin_port = htons(port);
usr.sbin/bootp/bootpd/bootpd.c
445
bind_addr.sin_port = htons(bootps_port);
usr.sbin/bootp/bootpgw/bootpgw.c
397
bind_addr.sin_port = htons(bootps_port);
usr.sbin/bootp/bootpgw/bootpgw.c
524
bp->bp_hops = htons(hops);
usr.sbin/bootp/bootpgw/bootpgw.c
572
serv_addr.sin_port = htons(bootps_port);
usr.sbin/bootp/bootpgw/bootpgw.c
624
clnt_addr.sin_port = htons(bootpc_port);
usr.sbin/bootp/bootptest/bootptest.c
265
sin_server.sin_port = htons(bootps_port);
usr.sbin/bootp/bootptest/bootptest.c
283
sin_client.sin_port = htons(bootpc_port);
usr.sbin/bootp/bootptest/bootptest.c
400
bp->bp_secs = htons(secs);
usr.sbin/faithd/ftp.c
493
sin->sin_port = htons(((po[0] & 0xff) << 8) | (po[1] & 0xff));
usr.sbin/faithd/ftp.c
685
sin6->sin6_port = htons(((po[0] & 0xff) << 8) | (po[1] & 0xff));
usr.sbin/fwctl/fwdv.c
385
ciph->fdf.dv.cyc = htons(f_cycle << 12 | f_frac);
usr.sbin/fwctl/fwdv.c
387
ciph->fdf.dv.cyc = htons(cycle << 12 | f_frac);
usr.sbin/ldpd/fsm.c
179
t->type = htons(LDP_ADDRESS);
usr.sbin/ldpd/fsm.c
180
t->length = htons(sizeof(struct address_list_tlv) - TLV_TYPE_LENGTH
usr.sbin/ldpd/fsm.c
184
t->a_type = htons(TLV_ADDRESS_LIST);
usr.sbin/ldpd/fsm.c
185
t->a_length = htons(sizeof(t->a_af) +
usr.sbin/ldpd/fsm.c
187
t->a_af = htons(LDP_AF_INET);
usr.sbin/ldpd/fsm.c
82
if (trtlv->type == htons(TLV_IPV4_TRANSPORT)) {
usr.sbin/ldpd/fsm.c
87
} else if (trtlv->type == htons(TLV_IPV6_TRANSPORT)) {
usr.sbin/ldpd/ldp_command.c
149
sin.sin_port = htons(port);
usr.sbin/ldpd/ldp_peer.c
140
connecting_su.sin.sin_port = htons(LDP_PORT);
usr.sbin/ldpd/ldp_peer.c
142
connecting_su.sin6.sin6_port = htons(LDP_PORT);
usr.sbin/ldpd/mpls_routes.c
806
al_tlv.type = rg->m_rtm.rtm_type == RTM_NEWADDR ? htons(LDP_ADDRESS) :
usr.sbin/ldpd/mpls_routes.c
807
htons(LDP_ADDRESS_WITHDRAW);
usr.sbin/ldpd/mpls_routes.c
808
al_tlv.length = htons(sizeof(al_tlv) - TLV_TYPE_LENGTH);
usr.sbin/ldpd/mpls_routes.c
810
al_tlv.a_type = htons(TLV_ADDRESS_LIST);
usr.sbin/ldpd/mpls_routes.c
811
al_tlv.a_length = htons(sizeof(al_tlv.a_af) + sizeof(al_tlv.a_address));
usr.sbin/ldpd/mpls_routes.c
812
al_tlv.a_af = htons(LDP_AF_INET);
usr.sbin/ldpd/notifications.c
54
t->type = htons(LDP_NOTIFICATION);
usr.sbin/ldpd/notifications.c
55
t->length = htons(sizeof(struct notification_tlv) - TLV_TYPE_LENGTH);
usr.sbin/ldpd/notifications.c
56
t->status = htons(TLV_STATUS);
usr.sbin/ldpd/socketops.c
1066
ti.type = htons(LDP_INITIALIZE);
usr.sbin/ldpd/socketops.c
1067
ti.length = htons(sizeof(struct init_tlv) - TLV_TYPE_LENGTH);
usr.sbin/ldpd/socketops.c
1069
ti.cs_type = htons(TLV_COMMON_SESSION);
usr.sbin/ldpd/socketops.c
1070
ti.cs_len = htons(CS_LEN);
usr.sbin/ldpd/socketops.c
1071
ti.cs_version = htons(LDP_VERSION);
usr.sbin/ldpd/socketops.c
1072
ti.cs_keepalive = htons(2 * ldp_keepalive_time);
usr.sbin/ldpd/socketops.c
1074
ti.cs_maxpdulen = htons(MAX_PDU_SIZE);
usr.sbin/ldpd/socketops.c
1086
kt.type = htons(LDP_KEEPALIVE);
usr.sbin/ldpd/socketops.c
1087
kt.length = htons(sizeof(kt.messageid));
usr.sbin/ldpd/socketops.c
1397
pdu.version = htons(LDP_VERSION);
usr.sbin/ldpd/socketops.c
1400
pdu.length = htons(ntohs(t->length) + TLV_TYPE_LENGTH +
usr.sbin/ldpd/socketops.c
347
su.sin.sin_port = htons(LDP_PORT);
usr.sbin/ldpd/socketops.c
354
su.sin6.sin6_port = htons(LDP_PORT);
usr.sbin/ldpd/socketops.c
373
sa.sin_port = htons(LDP_PORT);
usr.sbin/ldpd/socketops.c
445
spdu->version = htons(LDP_VERSION);
usr.sbin/ldpd/socketops.c
446
spdu->length = htons(IPV4_HELLO_MSG_SIZE - PDU_VER_LENGTH);
usr.sbin/ldpd/socketops.c
451
t->type = htons(LDP_HELLO);
usr.sbin/ldpd/socketops.c
452
t->length = htons(MSGID_SIZE +
usr.sbin/ldpd/socketops.c
462
cht->type = htons(TLV_COMMON_HELLO);
usr.sbin/ldpd/socketops.c
463
cht->length = htons(sizeof(cht->holdtime) + sizeof(cht->res));
usr.sbin/ldpd/socketops.c
464
cht->holdtime = htons(ldp_holddown_time);
usr.sbin/ldpd/socketops.c
473
trtlv->type = htons(TLV_IPV4_TRANSPORT);
usr.sbin/ldpd/socketops.c
474
trtlv->length = htons(sizeof(struct in_addr));
usr.sbin/ldpd/socketops.c
481
sadest.sin_port = htons(LDP_PORT);
usr.sbin/ldpd/socketops.c
547
spdu->length = htons(IPV6_HELLO_MSG_SIZE - PDU_VER_LENGTH);
usr.sbin/ldpd/socketops.c
548
t->length = htons(MSGID_SIZE +
usr.sbin/ldpd/socketops.c
551
trtlv->length = htons(sizeof(struct in6_addr));
usr.sbin/ldpd/socketops.c
552
trtlv->type = htons(TLV_IPV6_TRANSPORT);
usr.sbin/ldpd/socketops.c
558
sadest6.sin6_port = htons(LDP_PORT);
usr.sbin/ldpd/socketops.c
609
sb, ifb->ifa_name, htons(spdu->length),
usr.sbin/ldpd/socketops.c
610
htons(t->length), htons(cht->length),
usr.sbin/ldpd/socketops.c
611
htons(trtlv->length));
usr.sbin/ldpd/tlv_stack.c
235
t->type = htons(LDP_LABEL_RELEASE);
usr.sbin/ldpd/tlv_stack.c
273
lmt->type = htons(LDP_LABEL_MAPPING);
usr.sbin/ldpd/tlv_stack.c
274
lmt->length = htons(sizeof(struct label_map_tlv) - TLV_TYPE_LENGTH
usr.sbin/ldpd/tlv_stack.c
284
fec->type = htons(TLV_FEC);
usr.sbin/ldpd/tlv_stack.c
285
fec->length = htons(sizeof(struct prefix_tlv) - sizeof(struct in_addr) +
usr.sbin/ldpd/tlv_stack.c
296
p->af = htons(LDP_AF_INET);
usr.sbin/ldpd/tlv_stack.c
305
l->type = htons(TLV_GENERIC_LABEL);
usr.sbin/ldpd/tlv_stack.c
306
l->length = htons(sizeof(l->label));
usr.sbin/ldpd/tlv_stack.c
312
lrt, htons(lrt->length) + TLV_TYPE_LENGTH);
usr.sbin/ldpd/tlv_stack.c
368
lmt->type = htons(LDP_LABEL_WITHDRAW);
usr.sbin/ldpd/tlv_stack.c
369
lmt->length = htons(sizeof(struct label_map_tlv) - TLV_TYPE_LENGTH
usr.sbin/ldpd/tlv_stack.c
377
fec->type = htons(TLV_FEC);
usr.sbin/ldpd/tlv_stack.c
378
fec->length = htons(sizeof(struct fec_tlv) - TLV_TYPE_LENGTH
usr.sbin/ldpd/tlv_stack.c
390
p->af = htons(LDP_AF_INET);
usr.sbin/ldpd/tlv_stack.c
451
lrm.type = htons(TLV_LABEL_REQUEST);
usr.sbin/ldpd/tlv_stack.c
453
lrm.length = htons(socktmp.sa.sa_family == AF_INET ? 4 : 16);
usr.sbin/map-mbone/mapper.c
885
addr.sin_port = htons(2000); /* any port over 1024 will do... */
usr.sbin/mld6query/mld6.c
170
u_short rtalert_code = htons(IP6OPT_RTALERT_MLD);
usr.sbin/mld6query/mld6.c
189
mldh.mld6_maxdelay = htons(QUERY_RESPONSE_INTERVAL);
usr.sbin/mopd/common/pf-linux2.c
99
prot = ((typ == TRANS_8023) ? htons(ETH_P_802_2) : htons(protocol));
usr.sbin/mountd/mountd.c
2428
sasin.sin_port = htons(port);
usr.sbin/mountd/mountd.c
2435
sasin6.sin6_port = htons(port);
usr.sbin/mrinfo/mrinfo.c
403
addr.sin_port = htons(2000); /* any port over 1024 will
usr.sbin/mrouted/vif.c
712
addr.sin_port = htons(2000); /* any port over 1024 will do... */
usr.sbin/mrouted/vif.c
799
addr.sin_port = htons(2000); /* any port over 1024 will do... */
usr.sbin/mtrace/mtrace.c
1320
addr.sin_port = htons(2000); /* Any port above 1024 will do */
usr.sbin/ndbootd/ndbootd.c
550
if (ether_packet->ether_type != htons(ETHERTYPE_IP)
usr.sbin/ndbootd/ndbootd.c
955
ip_packet->ip_len = htons((ip_packet->ip_hl << 2)
usr.sbin/npf/npfctl/npf_bpf_comp.c
505
uint32_t mwords[] = { BM_ETHER_TYPE, 1, htons(type) };
usr.sbin/npf/npfctl/npf_bpf_comp.c
723
htonl(mac_word), htons(mac_hword)
usr.sbin/npf/npfctl/npf_data.c
325
pr.pr_start = htons(s);
usr.sbin/npf/npfctl/npf_data.c
326
pr.pr_end = htons(e);
usr.sbin/npf/npftest/libnpftest/npf_l2rule_test.c
107
m = mbuf_get_frame(t->src, t->dst, htons(t->etype));
usr.sbin/npf/npftest/libnpftest/npf_l2rule_test.c
80
m = mbuf_get_frame(t->src, t->dst, htons(t->etype));
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
135
ethdr->ether_type = htons(ETHERTYPE_IP);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
187
iphdr->ip_len = htons(size);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
213
ip6->ip6_plen = htons(size);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
254
iphdr->ip_len = htons(ntohs(iphdr->ip_len) + addlen);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
293
th->th_sport = htons(sport);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
294
th->th_dport = htons(dport);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
298
uh->uh_sport = htons(sport);
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c
299
uh->uh_dport = htons(dport);
usr.sbin/npf/npftest/libnpftest/npf_rid_test.c
183
server.sin_port = htons(LOCAL_PORT);
usr.sbin/npf/npftest/libnpftest/npf_rid_test.c
218
remote.sin_port = htons(REMOTE_PORT);
usr.sbin/npf/npftest/libnpftest/npf_state_test.c
125
ip->ip_len = htons(sizeof(struct ip) + sizeof(struct tcphdr) + p->tlen);
usr.sbin/npf/npftest/libnpftest/npf_state_test.c
129
th->th_win = htons(p->win);
usr.sbin/npf/npftest/libnpftest/npfl2onlytest.c
59
m = mbuf_get_frame(t->src, t->dst, htons(t->etype));
usr.sbin/pf/pfs/parse.y
351
host->port = htons(atoi(buf_port));
usr.sbin/rarpd/rarpd.c
797
ep->ether_type = htons(ETHERTYPE_REVARP);
usr.sbin/rarpd/rarpd.c
800
ap->ar_hrd = htons(ARPHRD_ETHER);
usr.sbin/rarpd/rarpd.c
801
ap->ar_pro = htons(ETHERTYPE_IP);
usr.sbin/rarpd/rarpd.c
802
ap->ar_op = htons(ARPOP_REVREPLY);
usr.sbin/rarpd/rarpd.c
815
ap->ea_hdr.ar_hrd = htons(ARPHRD_ETHER);
usr.sbin/rarpd/rarpd.c
816
ap->ea_hdr.ar_pro = htons(ETHERTYPE_IP);
usr.sbin/rarpd/rarpd.c
817
ap->arp_op = htons(ARPOP_REVREPLY);
usr.sbin/rbootd/rmp_var.h
163
{ (w).val[_WORD_HIGHPART] = htons((u_int16_t) ((i >> 16) & 0xffff)); \
usr.sbin/rbootd/rmp_var.h
164
(w).val[_WORD_LOWPART] = htons((u_int16_t) (i & 0xffff)); \
usr.sbin/rbootd/rmpproto.c
191
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
usr.sbin/rbootd/rmpproto.c
244
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
usr.sbin/rbootd/rmpproto.c
313
rpl->r_brpl.rmp_session = htons(GenSessID());
usr.sbin/rbootd/rmpproto.c
314
rpl->r_brpl.rmp_version = htons(RMP_VERSION);
usr.sbin/rbootd/rmpproto.c
453
req->r_rrq.rmp_size = htons(RMPREADDATA);
usr.sbin/rbootd/rmpproto.c
574
rconn->rmp.hp_hdr.len = htons(rconn->rmplen - sizeof(struct hp_hdr));
usr.sbin/rbootd/rmpproto.c
579
rconn->rmp.hp_llc.dxsap = htons(HPEXT_SXSAP);
usr.sbin/rbootd/rmpproto.c
580
rconn->rmp.hp_llc.sxsap = htons(HPEXT_DXSAP);
usr.sbin/route6d/route6d.c
1937
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
2129
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
2925
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/route6d/route6d.c
735
rrt_info.rip6_tag = htons(routetag & 0xffff);
usr.sbin/rtadvd/config.c
1095
ra->nd_ra_router_lifetime = htons(rainfo->lifetime);
usr.sbin/timed/timed/byteorder.c
48
ptr->tsp_seq = htons((uint16_t)ptr->tsp_seq);
usr.sbin/traceroute/traceroute.c
1249
outip->ip_len = htons(packlen);
usr.sbin/traceroute/traceroute.c
1255
outip->ip_id = htons(ident + seq);
usr.sbin/traceroute/traceroute.c
1278
outicmp->icmp_seq = htons(seq);
usr.sbin/traceroute/traceroute.c
1280
outudp->uh_dport = htons(port + seq);
usr.sbin/traceroute/traceroute.c
1459
icp->icmp_id == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1460
icp->icmp_seq == htons(seq))
usr.sbin/traceroute/traceroute.c
1467
hicmp->icmp_id == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1468
hicmp->icmp_seq == htons(seq))
usr.sbin/traceroute/traceroute.c
1475
up->uh_sport == htons(ident) &&
usr.sbin/traceroute/traceroute.c
1476
up->uh_dport == htons(port + seq))
usr.sbin/traceroute/traceroute.c
1506
htons((u_int16_t)(packlen - (sizeof(*outip) + optlen)));
usr.sbin/traceroute/traceroute.c
658
outip->ip_len = htons(packlen);
usr.sbin/traceroute/traceroute.c
659
outip->ip_off = htons(off);
usr.sbin/traceroute/traceroute.c
691
ident = htons(arc4random() & 0xffff) | 0x8000;
usr.sbin/traceroute/traceroute.c
697
outicmp->icmp_id = htons(ident);
usr.sbin/traceroute/traceroute.c
704
outudp->uh_sport = htons(ident);
usr.sbin/traceroute/traceroute.c
706
htons((u_int16_t)(packlen - (sizeof(*outip) + optlen)));
usr.sbin/traceroute/traceroute.c
945
if (!useicmp && htons(port + seq + 1) == 0)
usr.sbin/traceroute6/traceroute6.c
418
ident = htons(arc4random() & 0xffff);
usr.sbin/traceroute6/traceroute6.c
619
Nxt.sin6_port = htons(DUMMY_PORT);
usr.sbin/traceroute6/traceroute6.c
636
Src.sin6_port = htons(0);
usr.sbin/traceroute6/traceroute6.c
690
if (!useicmp && htons((in_port_t)(port + seq + 1)) == 0)
usr.sbin/traceroute6/traceroute6.c
818
Dst.sin6_port = htons(port + seq);
usr.sbin/traceroute6/traceroute6.c
830
icp->icmp6_seq = htons(seq);
usr.sbin/traceroute6/traceroute6.c
986
((struct icmp6_hdr *)up)->icmp6_seq == htons(seq))
usr.sbin/traceroute6/traceroute6.c
989
up->uh_sport == htons(srcport) &&
usr.sbin/traceroute6/traceroute6.c
990
up->uh_dport == htons(port + seq))
usr.sbin/traceroute6/traceroute6.c
994
icp->icmp6_seq == htons(seq))
usr.sbin/wakeonlan/wakeonlan.c
171
pkt.hdr.ether_type = htons(0);
usr.sbin/ypbind/ypbind.c
1027
bindsin.sin_port = htons(PMAPPORT);
usr.sbin/ypbind/ypbind.c
1110
bindsin.sin_port = htons(PMAPPORT);
usr.sbin/ypbind/ypbind.c
1260
raddr.sin_port = htons((uint16_t)rmtcr_port);
usr.sbin/ypbind/ypbind.c
1407
bindsin.sin_port = htons(PMAPPORT);
usr.sbin/ypserv/common/yplib_host.c
75
rsrv_sin.sin_port = htons(port);
usr.sbin/ypserv/ypserv/ypserv.c
485
sasin.sin_port = htons(port);
usr.sbin/ypserv/ypserv/ypserv.c
492
sasin6.sin6_port = htons(port);
usr.sbin/ypset/ypset.c
118
port = htons(getrpcport(server, YPPROG, YPPROC_NULL, IPPROTO_UDP));