bin/date/netdate.c
176
msg.tsp_seq = ntohs(msg.tsp_seq);
crypto/dist/ipsec-tools/src/libipsec/key_debug.c
540
printf("sadb_x_nat_t_port{ port=%u }\n", ntohs(ntp->sadb_x_nat_t_port_port));
crypto/dist/ipsec-tools/src/libipsec/key_debug.c
851
printf(" port=%u\n", ntohs(sin4->sin_port));
crypto/dist/ipsec-tools/src/libipsec/key_debug.c
857
printf(" port=%u\n", ntohs(sin6->sin6_port));
crypto/dist/ipsec-tools/src/libipsec/libpfkey.h
168
#define PFKEY_ADDR_X_PORT(ext) (ntohs(((struct sadb_x_nat_t_port *)ext)->sadb_x_nat_t_port_port))
crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c
321
printf("[%u]", ntohs(natt_sport->sadb_x_nat_t_port_port));
crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c
337
printf("[%u]", ntohs(natt_dport->sadb_x_nat_t_port_port));
crypto/dist/ipsec-tools/src/racoon/getcertsbyname.c
246
qdcount = ntohs(hp->qdcount);
crypto/dist/ipsec-tools/src/racoon/getcertsbyname.c
247
ancount = ntohs(hp->ancount);
crypto/dist/ipsec-tools/src/racoon/gssapi.c
598
hashbuf.length = ntohs(iph1->pl_hash->h.len) - sizeof(*iph1->pl_hash);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1315
tlen = ntohs(prop->h.len)
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1420
newtlen += ntohs(p->trns->h.len);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1441
trnslen = ntohs(p->trns->h.len);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1565
newtlen += ntohs(p->trns->h.len);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1596
trnslen = ntohs(p->trns->h.len);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1650
ld = ntohs(*(uint16_t *)buf->v);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1677
tlen = ntohs(notify->h.len) - sizeof(*notify) - notify->spi_size;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1682
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1683
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1684
lorv = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1704
value = ntohs(*(uint16_t *)(d + 1));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1980
tlen = ntohs(trns->h.len) - sizeof(struct isakmp_pl_t);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1984
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1985
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
1986
lorv = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2193
tlen = ntohs(trns->h.len) - sizeof(struct isakmp_pl_t);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2198
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2199
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2200
lorv = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2413
tlen = ntohs(trns->h.len) - sizeof(struct isakmp_pl_t);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2418
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2419
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
2420
lorv = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3533
if (id_b->proto_id == 0 && ntohs(id_b->port) != 0) {
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3537
id_b->proto_id, ntohs(id_b->port));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3545
if (ntohs(id_b->port) != PORT_ISAKMP) {
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3549
if (ntohs(id_b->port) != port) {
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
3552
port, ntohs(id_b->port));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
400
tlen = ntohs(trns->h.len) - sizeof(*trns);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
414
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
415
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
420
s_oakley_attr_v(type, ntohs(d->lorv)));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
435
len = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4432
tlen = ntohs(t->h.len) - sizeof(*t);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4444
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4445
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4450
s_ipsecdoi_attr_v(type, ntohs(d->lorv)));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4455
int xtype = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4472
|| (ntohs(prev->type) & ~ISAKMP_GEN_MASK) !=
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4493
int len = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
450
sa->enctype = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
454
sa->hashtype = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4561
pp->pfs_group = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4562
else if (pp->pfs_group != (uint16_t)ntohs(d->lorv)) {
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4572
pr->encmode != (uint16_t)ntohs(d->lorv)) {
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4578
pr->encmode = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
458
sa->authmethod = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4588
tr->authtype = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4597
tr->encklen = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4602
int len = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4604
pp->sctx.ctx_strlen = ntohs(pp->sctx.ctx_strlen);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4620
tlen -= (sizeof(*d) + ntohs(d->lorv));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
4621
d = (struct isakmp_data *)((caddr_t)d + sizeof(*d) + ntohs(d->lorv));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
467
sa->dh_group = (uint16_t)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
472
int xtype = (int)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
486
sa->dhgrp->gen1 = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
488
int xlen = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
500
sa->dhgrp->gen2 = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
502
int xlen = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
521
int xtype = (int)ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
535
|| (ntohs(prev->type) & ~ISAKMP_GEN_MASK) !=
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
571
int xlen = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
598
int xlen = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
697
tlen -= (sizeof(*d) + ntohs(d->lorv));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
698
d = (struct isakmp_data *)((char *)d + sizeof(*d) + ntohs(d->lorv));
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
936
len = ntohs(r->trns->h.len) - sizeof(*p->trns);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
1452
p->len = ntohs(gen->len);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
1479
plen = ntohs(gen->len);
crypto/dist/ipsec-tools/src/racoon/isakmp.c
1552
snprintf((char *)&buf[j], sizeof(buf) - j, ":%08x", ntohs(msgid));
crypto/dist/ipsec-tools/src/racoon/isakmp.c
251
if (ntohs(x.lbuf.udp.dest) == 501) {
crypto/dist/ipsec-tools/src/racoon/isakmp.c
255
if (ntohs(x.lbuf.udp.uh_dport) == 501) {
crypto/dist/ipsec-tools/src/racoon/isakmp.c
2564
*buf = vmalloc(ntohs(gen->len) - sizeof(*gen));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1710
size_t alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1728
size_t alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
1750
size_t alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
199
if (tlen < ntohs(ph->len)) {
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
206
plogdump(LLV_DEBUG, ph, ntohs(ph->len));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
215
plen = ntohs(ph->len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
217
plen = ntohs(nph->len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
262
tlen -= ntohs(ph->len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
264
ph = (struct isakmp_gen *)(npp + ntohs(ph->len));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
314
tlen = ntohs(attrpl->h.len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
319
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
327
s_isakmp_cfg_type(type), ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
332
attr, ntohs(attrpl->id))) != 0)
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
348
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
349
alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
375
attr, ntohs(attrpl->id))) != 0)
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
459
alen = ntohs(attrpl->h.len) - sizeof(*attrpl);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
493
tlen = ntohs(attrpl->h.len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
499
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
507
s_isakmp_cfg_type(type), ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
531
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
532
alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
660
tlen = ntohs(attrpl->h.len);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
669
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
699
alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
764
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
927
if ((ntohs(attr->type) & ISAKMP_GEN_MASK) == ISAKMP_GEN_TLV)
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
928
len = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
935
memcpy(buffer->v, attr, sizeof(*attr) + ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c
954
type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
237
if (msg->l < sizeof(*isakmp) + ntohs(frag->len) ||
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
238
ntohs(frag->len) < sizeof(*frag) + 1) {
crypto/dist/ipsec-tools/src/racoon/isakmp_frag.c
243
if ((buf = vmalloc(ntohs(frag->len) - sizeof(*frag))) == NULL) {
crypto/dist/ipsec-tools/src/racoon/isakmp_ident.c
1860
type = ntohs(notify->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
192
if (msg->l < sizeof(*isakmp) + ntohs(gen->len) + sizeof(*nd)) {
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
201
nd = (struct isakmp_gen *) ((caddr_t) gen + ntohs(gen->len));
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
204
if (ntohs(nd->len) > msg->l - (sizeof(struct isakmp) +
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
205
ntohs(gen->len))) {
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
211
if (ntohs(nd->len) < sizeof(*nd)) {
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
217
payload = vmalloc(ntohs(nd->len));
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
224
memcpy(payload->v, (caddr_t) nd, ntohs(nd->len));
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
236
if (ntohs(gen->len) - sizeof(struct isakmp_gen) != hash->l) {
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
336
type = ntohs(notify->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
337
if (ntohs(notify->h.len) < sizeof(*notify) + notify->spi_size) {
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
349
l = ntohs(notify->h.len) - sizeof(*notify) - notify->spi_size;
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
390
type = ntohs(notify->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
468
num_spi = ntohs(delete->num_spi);
crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c
469
tlen = ntohs(delete->h.len) - sizeof(struct isakmp_pl_d);
crypto/dist/ipsec-tools/src/racoon/isakmp_newg.c
152
len = sizeof(isakmp->msgid) + ntohs(sa->h.len);
crypto/dist/ipsec-tools/src/racoon/isakmp_newg.c
160
memcpy(buf->v + sizeof(isakmp->msgid), sa, ntohs(sa->h.len));
crypto/dist/ipsec-tools/src/racoon/isakmp_newg.c
176
plogdump(LLV_DEBUG, r_hash, ntohs(hash->h.len) - sizeof(*hash)));
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
1311
plogdump(LLV_DEBUG, r_hash, ntohs(hash->h.len) - sizeof(*hash));
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
1775
plogdump(LLV_DEBUG, r_hash, ntohs(hash->h.len) - sizeof(*hash));
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
2525
type = ntohs(notify->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
708
plogdump(LLV_DEBUG, r_hash, ntohs(hash->h.len) - sizeof(*hash));
crypto/dist/ipsec-tools/src/racoon/isakmp_quick.c
993
plogdump(LLV_DEBUG, r_hash, ntohs(hash->h.len) - sizeof(*hash));
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
101
type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
109
s_isakmp_cfg_type(type), ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
205
int type = ntohs(attr->type);
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
206
int alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1487
type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1492
if ((ntohs(attr->type) & ISAKMP_GEN_TV) == 0) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1497
if (ntohs(attr->lorv) != XAUTH_TYPE_GENERIC) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1500
ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1556
if ((ntohs(attr->type) & ISAKMP_GEN_TV) == 0) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1557
dlen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1633
type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1658
if (ntohs(attr->lorv) != XAUTH_STATUS_OK) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1673
if ((ntohs(attr->type) & ISAKMP_GEN_TV) == 0) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
1674
dlen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
206
type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
209
switch (ntohs(attr->lorv)) {
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
216
ntohs(type));
crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c
236
alen = ntohs(attr->lorv);
crypto/dist/ipsec-tools/src/racoon/oakley.c
1285
ntohs(iph1->pl_hash->h.len) - sizeof(*iph1->pl_hash));
crypto/dist/ipsec-tools/src/racoon/oakley.c
144
if (ntohs(gen->len) <= sizeof(*gen)) {
crypto/dist/ipsec-tools/src/racoon/oakley.c
151
p.l = ntohs(gen->len) - sizeof(*gen);
crypto/dist/ipsec-tools/src/racoon/oakley.c
2002
ntohs(gen->len) - sizeof(*gen) - 1);
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1274
if ((ntohs(attr->type) & ISAKMP_GEN_MASK) == ISAKMP_GEN_TV) {
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1281
if (len < (sizeof(*attr) + ntohs(attr->lorv))) {
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1286
switch (ntohs(attr->type) & ~ISAKMP_GEN_MASK) {
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1288
if (ntohs(attr->lorv) < sizeof(addr4)) {
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1296
banner = racoon_malloc(ntohs(attr->lorv) + 1);
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1301
memcpy(banner, attr + 1, ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1302
banner[ntohs(attr->lorv)] = '\0';
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1309
len -= (sizeof(*attr) + ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/racoonctl.c
1312
(n + sizeof(*attr) + ntohs(attr->lorv));
crypto/dist/ipsec-tools/src/racoon/security.c
115
len = ntohs(prop->h.len) -
crypto/dist/ipsec-tools/src/racoon/security.c
130
len = ntohs(trns->h.len) - sizeof(struct isakmp_pl_t);
crypto/dist/ipsec-tools/src/racoon/security.c
134
type = ntohs(d->type) & ~ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/security.c
135
flag = ntohs(d->type) & ISAKMP_GEN_MASK;
crypto/dist/ipsec-tools/src/racoon/security.c
136
lorv = ntohs(d->lorv);
crypto/dist/ipsec-tools/src/racoon/security.c
149
flag = ntohs(d->type & ISAKMP_GEN_MASK);
crypto/dist/ipsec-tools/src/racoon/security.c
156
p->sec_ctx.ctx_strlen = ntohs(p->sec_ctx.ctx_strlen);
crypto/dist/ipsec-tools/src/racoon/sockmisc.c
942
return ntohs(port);
crypto/dist/ipsec-tools/src/racoon/vendorid.c
225
vidlen = ntohs(gen->len) - sizeof(*gen);
crypto/dist/ipsec-tools/src/setkey/parse.y
1273
port = ntohs(sin4->sin_port);
crypto/dist/ipsec-tools/src/setkey/parse.y
1279
port = ntohs(sin6->sin6_port);
dist/pf/libexec/tftp-proxy/tftp-proxy.c
232
if (!(ntohs(tp->th_opcode) == RRQ || ntohs(tp->th_opcode) == WRQ)) {
dist/pf/libexec/tftp-proxy/tftp-proxy.c
289
ntohs(((struct sockaddr_in *)&from)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
291
ntohs(((struct sockaddr_in *)&proxy)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
293
ntohs(((struct sockaddr_in *)&proxy_to_server)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
295
ntohs(((struct sockaddr_in *)&server)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
296
opcode(ntohs(tp->th_opcode)),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
307
(struct sockaddr *)&proxy_to_server, ntohs(sock_out.sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
309
ntohs(((struct sockaddr_in *)&from)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
319
ntohs(((struct sockaddr_in *)&from)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
326
ntohs(((struct sockaddr_in *)&from)->sin_port),
dist/pf/libexec/tftp-proxy/tftp-proxy.c
335
ntohs(((struct sockaddr_in *)&server)->sin_port),
dist/pf/sbin/pfctl/parse.y
3563
r.rpool.proxy_port[0] = ntohs($9->rport.a);
dist/pf/sbin/pfctl/parse.y
3570
ntohs($9->rport.a) +
dist/pf/sbin/pfctl/parse.y
3571
(ntohs(
dist/pf/sbin/pfctl/parse.y
3573
ntohs(
dist/pf/sbin/pfctl/parse.y
3577
ntohs($9->rport.b);
dist/pf/sbin/pfctl/parse.y
3581
ntohs($9->rport.b);
dist/pf/sbin/pfctl/parse.y
4324
snprintf(a1, sizeof(a1), "%u", ntohs(port->port[0]));
dist/pf/sbin/pfctl/parse.y
4325
snprintf(a2, sizeof(a2), "%u", ntohs(port->port[1]));
dist/pf/sbin/pfctl/pf_print_state.c
157
u_int16_t p = ntohs(h->port);
dist/pf/sbin/pfctl/pfctl_parser.c
365
p1 = ntohs(p1);
dist/pf/sbin/pfctl/pfctl_parser.c
366
p2 = ntohs(p2);
games/hunt/hunt/hunt.c
255
num_players = ntohs(serverlist_getresponse(i));
games/hunt/huntd/driver.c
189
return ntohs(((struct sockaddr_in *)&addr)->sin_port);
games/hunt/huntd/driver.c
191
return ntohs(((struct sockaddr_in6 *)&addr)->sin6_port);
games/hunt/huntd/driver.c
256
switch (ntohs(msg)) {
lib/libc/net/getaddrinfo.c
1751
ancount = ntohs(hp->ancount);
lib/libc/net/getaddrinfo.c
1752
qdcount = ntohs(hp->qdcount);
lib/libc/net/getaddrinfo.c
1995
h_errno = ntohs(hp->ancount) > 0? NO_DATA : NO_RECOVERY;
lib/libc/net/getaddrinfo.c
2634
if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
lib/libc/net/getaddrinfo.c
2640
ntohs(hp->ancount),
lib/libc/net/getaddrinfo.c
2641
ntohs(hp->nscount),
lib/libc/net/getaddrinfo.c
2642
ntohs(hp->arcount));
lib/libc/net/getaddrinfo.c
2647
ancount += ntohs(hp->ancount);
lib/libc/net/gethnamaddr.c
257
ancount = ntohs(hp->ancount);
lib/libc/net/gethnamaddr.c
258
qdcount = ntohs(hp->qdcount);
lib/libc/net/getnameinfo.c
181
ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node);
lib/libc/net/getnameinfo.c
199
ntohs(sat->sat_range.r_netrange.nr_firstnet),
lib/libc/net/getnameinfo.c
200
ntohs(sat->sat_range.r_netrange.nr_lastnet ));
lib/libc/net/getnameinfo.c
312
snprintf(numserv, sizeof(numserv), "%u", ntohs(port));
lib/libc/net/getnetnamadr.c
199
ancount = ntohs(hp->ancount); /* #/records in the answer section */
lib/libc/net/getnetnamadr.c
200
qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
lib/libc/net/hesiod.c
441
ancount = ntohs(hp->ancount);
lib/libc/net/hesiod.c
442
qdcount = ntohs(hp->qdcount);
lib/libc/net/inet6_scopeid.c
58
sin6->sin6_scope_id = ntohs(scope);
lib/libc/net/rcmd.c
111
snprintf(pbuf, sizeof(pbuf), "%u", ntohs(rport));
lib/libc/net/rcmd.c
169
snprintf(pbuf, sizeof(pbuf), "%u", ntohs(rport));
lib/libc/net/rcmd.c
571
*alport = (int)ntohs(*portp);
lib/libc/net/sctp_sys_calls.c
75
prt = ntohs(((struct sockaddr_in *)a)->sin_port);
lib/libc/net/sctp_sys_calls.c
78
prt = ntohs(((struct sockaddr_in6 *)a)->sin6_port);
lib/libc/resolv/res_mkquery.c
271
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libc/resolv/res_query.c
206
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
lib/libc/resolv/res_query.c
211
ntohs(hp->ancount),
lib/libc/resolv/res_query.c
212
ntohs(hp->nscount),
lib/libc/resolv/res_query.c
213
ntohs(hp->arcount));
lib/libc/resolv/res_send.c
269
int qdcount = ntohs(((const HEADER*)(const void *)buf)->qdcount);
lib/libc/resolv/res_send.c
307
int qdcount = ntohs(((const HEADER*)(const void *)buf1)->qdcount);
lib/libc/resolv/res_send.c
320
if (qdcount != ntohs(((const HEADER*)(const void *)buf2)->qdcount))
lib/libc/rpc/rpc_generic.c
654
port = ntohs(sinp->sin_port);
lib/libc/rpc/rpc_generic.c
668
port = ntohs(sin6->sin6_port);
lib/libc/rpc/rpc_soc.c
275
svc->xp_port = ntohs(port);
lib/libcompat/4.3/rexec.c
135
port = ntohs((u_short)sin2.sin_port);
lib/libisns/isns_util.h
41
#define isns_ntohs ntohs
lib/libnpf/npf.c
1446
port[0] = ntohs(nvlist_get_number(nat, "oport"));
lib/libnpf/npf.c
1447
port[1] = ntohs(nvlist_get_number(nat, "tport"));
lib/libnpf/npf.c
1464
port[0] = ntohs(port[0]); port[1] = ntohs(port[1]);
lib/libnpf/npf.c
1481
ep->port[0] = ntohs(nvlist_get_number(key_nv, "sport"));
lib/libnpf/npf.c
1482
ep->port[1] = ntohs(nvlist_get_number(key_nv, "dport"));
lib/libnpf/npf.c
1505
ep.port[2] = ntohs(nvlist_get_number(nat_nv, "tport"));
lib/libresolv/ns_sign.c
234
PUTSHORT(ntohs(hp->id), cp); /*%< already in network order */
lib/libresolv/ns_sign.c
251
hp->arcount = htons(ntohs(hp->arcount) + 1);
lib/libresolv/ns_sign.c
378
PUTSHORT(ntohs(hp->id), cp); /*%< already in network order */
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
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
387
hp->arcount = htons(ntohs(hp->arcount) - 1);
lib/libresolv/ns_verify.c
76
n = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount));
lib/libresolv/ns_verify.c
81
n = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount));
lib/libresolv/ns_verify.c
86
n = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount));
lib/libresolv/ns_verify.c
91
n = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1);
lib/libresolv/res_mkupdate.c
1096
port = ntohs(port);
lib/libresolv/res_mkupdate.c
984
slp->port = ntohs((u_int16_t)sp->s_port); /*%< host byte order */
lib/libutil/sockaddr_snprintf.c
173
p = ntohs(sat->sat_port);
lib/libutil/sockaddr_snprintf.c
175
ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node);
lib/libutil/sockaddr_snprintf.c
187
p = ntohs(sin4->sin_port);
lib/libutil/sockaddr_snprintf.c
193
p = ntohs(sin6->sin6_port);
lib/libwrap/rfc931.c
199
ntohs(*rmt_portp),
lib/libwrap/rfc931.c
200
ntohs(*our_portp));
lib/libwrap/rfc931.c
214
&& ntohs(*rmt_portp) == rmt_port
lib/libwrap/rfc931.c
215
&& ntohs(*our_portp) == our_port) {
libexec/ftpd/ftpd.c
1621
ntohs(ctrl_addr.su_port) > IPPORT_RESERVED + 1)) {
libexec/ftpd/ftpd.c
1955
port = ntohs(ctrl_addr.su_port) - 1;
libexec/ftpd/ftpd.c
3249
ntohs(pasv_addr.su_port));
libexec/identd/ipf.c
57
nl.nl_realport = ntohs(csatosin(&ss[0])->sin_port);
libexec/identd/ipf.c
58
nl.nl_outport = ntohs(csatosin(&ss[1])->sin_port);
libexec/identd/npf.c
111
*nat_lport = ntohs(port[0]);
libexec/rlogind/rlogind.c
343
if (ntohs(*portp) >= IPPORT_RESERVED ||
libexec/rlogind/rlogind.c
344
ntohs(*portp) < IPPORT_RESERVED/2) {
libexec/rlogind/rlogind.c
437
w.ws_row = ntohs(w.ws_row);
libexec/rlogind/rlogind.c
438
w.ws_col = ntohs(w.ws_col);
libexec/rlogind/rlogind.c
439
w.ws_xpixel = ntohs(w.ws_xpixel);
libexec/rlogind/rlogind.c
440
w.ws_ypixel = ntohs(w.ws_ypixel);
libexec/rshd/rshd.c
342
if (ntohs(*portp) >= IPPORT_RESERVED
libexec/rshd/rshd.c
343
|| ntohs(*portp) < IPPORT_RESERVED / 2) {
libexec/rshd/rshd.c
346
naddr, ntohs(*portp));
libexec/talkd/process.c
77
mp->addr.sa_family = ntohs(mp->addr.sa_family);
libexec/talkd/process.c
78
mp->ctl_addr.sa_family = ntohs(mp->ctl_addr.sa_family);
libexec/tftpd/tftpd.c
1000
ap->th_block = ntohs((u_short)ap->th_block);
libexec/tftpd/tftpd.c
1095
dp->th_opcode = ntohs((u_short)dp->th_opcode);
libexec/tftpd/tftpd.c
1096
dp->th_block = ntohs((u_short)dp->th_block);
libexec/tftpd/tftpd.c
441
tp->th_opcode = ntohs(tp->th_opcode);
libexec/tftpd/tftpd.c
999
ap->th_opcode = ntohs((u_short)ap->th_opcode);
regress/sys/compat/uipc_syscalls_43.c
114
ntohs(sa.sin_port),
regress/sys/compat/uipc_syscalls_43.c
134
ntohs(sa.sin_port),
regress/sys/compat/uipc_syscalls_43.c
176
ntohs(sa.sin_port),
regress/sys/compat/uipc_syscalls_43.c
65
ntohs(sa.sin_port),
regress/sys/compat/uipc_syscalls_43.c
77
ntohs(sa.sin_port),
sbin/fsck_ffs/setup.c
651
if (ntohs(appleufs->ul_namelen) > APPLEUFS_MAX_LABEL_NAME) {
sbin/fsck_ffs/setup.c
662
if (ntohs(appleufs->ul_namelen) == 0) {
sbin/fsck_ffs/setup.c
674
for (i=0;i<ntohs(appleufs->ul_namelen);i++) {
sbin/ifconfig/af_atalk.c
156
if (ntohs(nr.nr_firstnet) > ntohs(sat->sat_addr.s_net) ||
sbin/ifconfig/af_atalk.c
157
ntohs(nr.nr_lastnet) < ntohs(sat->sat_addr.s_net))
sbin/ifconfig/af_atalk.c
245
printf(" broadcast %u.%u", ntohs(sat->sat_addr.s_net),
sbin/ping/ping.c
1077
ntohs((u_int16_t)icp->icmp_seq), \
sbin/ping/ping.c
1128
if (TST(ntohs((u_int16_t)icp->icmp_seq))) {
sbin/ping/ping.c
1132
SET(ntohs((u_int16_t)icp->icmp_seq));
sbin/ping/ping.c
1166
u_int16_t seqno = ntohs((u_int16_t)icp->icmp_seq);
sbin/ping/ping.c
1578
ntohs(icp->icmp_nextmtu));
sbin/ping/ping.c
1658
ntohs(icp->icmp_id), ntohs(icp->icmp_seq));
sbin/ping/ping.c
1667
ntohs(icp->icmp_id), ntohs(icp->icmp_seq));
sbin/ping/ping.c
1864
ntohs((u_int16_t)icp2.icmp_id),
sbin/ping/ping.c
1865
ntohs((u_int16_t)icp2.icmp_seq));
sbin/ping/ping.c
1868
ntohs((u_int16_t)icp2.icmp_seq));
sbin/ping6/ping6.c
1101
seq = ntohs(seq);
sbin/ping6/ping6.c
1203
if (ntohs(icp->icmp6_id) == ident)
sbin/ping6/ping6.c
1340
seq = ntohs(icp->icmp6_seq);
sbin/ping6/ping6.c
1410
seq = ntohs(seq);
sbin/ping6/ping6.c
1426
switch (ntohs(ni->ni_code)) {
sbin/ping6/ping6.c
1430
printf("refused, type 0x%x", ntohs(ni->ni_type));
sbin/ping6/ping6.c
1433
printf("unknown, type 0x%x", ntohs(ni->ni_type));
sbin/ping6/ping6.c
1437
ntohs(ni->ni_code), ntohs(ni->ni_type));
sbin/ping6/ping6.c
1441
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
1643
ntohs(value2));
sbin/ping6/ping6.c
1775
if (sizeof(cbit) + ntohs(cbit.words) * sizeof(v) >
sbin/ping6/ping6.c
1779
clen = ntohs(cbit.words) * sizeof(v);
sbin/ping6/ping6.c
1780
skip = (size_t)ntohs(cbit.skip) * 32;
sbin/ping6/ping6.c
2173
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
2243
switch (ntohs(ni->ni_qtype)) {
sbin/ping6/ping6.c
2293
ntohs(ip6->ip6_plen), ip6->ip6_nxt, ip6->ip6_hlim);
sbin/ping6/ping6.c
818
src.sin6_port = ntohs(DUMMY_PORT);
sbin/routed/input.c
1007
if (na2->a_type != ntohs(1))
sbin/routed/input.c
1011
na2->a_type, ntohs(1),
sbin/routed/input.c
368
ntohs(n->n_family),
sbin/routed/input.c
467
if (ntohs(from->sin_port) > IPPORT_RESERVED) {
sbin/routed/input.c
506
if (from->sin_port != ntohs(RIP_PORT)) {
sbin/routed/input.c
510
ntohs(from->sin_port), naddr_ntoa(FROM_NADDR));
sbin/routed/input.c
975
len = ntohs(NA->au.a_md5.md5_pkt_len);
sbin/routed/output.c
214
ntohs(osin.sin_port),
sbin/routed/rdisc.c
1056
ntohs(p->ad.icmp_ad_life),
sbin/routed/rdisc.c
134
ntohs(p->ad.icmp_ad_life));
sbin/routed/rtquery/rtquery.c
357
myaddr.sin_port = ntohs(myaddr.sin_port)-1;
sbin/routed/rtquery/rtquery.c
746
ntohs(na->au.a_md5.md5_pkt_len),
sbin/routed/rtquery/rtquery.c
756
ntohs(na->a_type));
sbin/routed/rtquery/rtquery.c
761
&& na->a_type == ntohs(1)) {
sbin/routed/rtquery/rtquery.c
779
ntohs(n->n_family),
sbin/routed/trace.c
1015
ntohs(n->n_tag));
sbin/routed/trace.c
627
(void)fprintf(ftrace, "tag=%#x ", ntohs(rts->rts_tag));
sbin/routed/trace.c
908
ntohs(who->sin_port),
sbin/routed/trace.c
915
naddr_ntoa(who->sin_addr.s_addr), ntohs(who->sin_port),
sbin/routed/trace.c
946
ntohs(n->n_tag));
sbin/routed/trace.c
970
ntohs(NA->au.a_md5.md5_pkt_len),
sbin/routed/trace.c
974
(int)ntohs(NA->au.a_md5.rsvd[0]),
sbin/routed/trace.c
975
(int)ntohs(NA->au.a_md5.rsvd[1]));
sbin/routed/trace.c
980
ntohs(NA->a_type));
sbin/routed/trace.c
994
ntohs(n->n_family),
share/doc/psd/20.ipctut/dgramread.c
75
printf("Socket has port #%d\en", ntohs(name.sin_port));
share/doc/psd/20.ipctut/strchkread.c
75
printf("Socket has port #%d\en", ntohs(server.sin_port));
share/doc/psd/20.ipctut/streamread.c
75
printf("Socket has port #%d\en", ntohs(server.sin_port));
share/examples/refuse/ian/libfetch/common.c
182
return (ntohs(se->s_port));
share/examples/refuse/ian/libfetch/ftp.c
826
p = ntohs(sin4->sin_port);
share/examples/refuse/ian/libfetch/ftp.c
856
((unsigned)ntohs(sin6->sin6_port) >> 8) & 0xff,
share/examples/refuse/ian/libfetch/ftp.c
857
ntohs(sin6->sin6_port) & 0xff);
sys/altq/altq_blue.c
564
sum = ~ntohs(ip->ip_sum) & 0xffff;
sys/altq/altq_red.c
583
sum = ~ntohs(ip->ip_sum) & 0xffff;
sys/altq/altq_subr.c
1618
if ((ntohs(ip->ip_off) & IP_MF) == 0)
sys/altq/altq_subr.c
720
sum = ~ntohs(ip->ip_sum) & 0xffff;
sys/altq/altq_subr.c
902
ip_off = ntohs(ip->ip_off);
sys/arch/arm/imx/if_enet.c
1654
switch (ntohs(etype)) {
sys/arch/arm/imx/if_enet.c
668
if (ntohs(eh->ether_type) != ETHERTYPE_IP)
sys/arch/emips/stand/common/enic.c
318
printf("ether_type = 0x%x\n", ntohs(eh->ether_type));
sys/arch/emips/stand/common/enic.c
320
if (ntohs(eh->ether_type) == 0x0800) {
sys/arch/hpc/stand/include/machine/endian.h
151
#define NTOHS(x) (x) = ntohs((uint16_t)(x))
sys/arch/hpc/stand/include/machine/endian.h
88
uint16_t ntohs(uint16_t) __attribute__((__const__));
sys/arch/mips/adm5120/dev/if_admsw.c
649
if (ntohs(eh->ether_type) == ETHERTYPE_IP &&
sys/arch/mips/ralink/ralink_eth.c
1518
ether_sprintf(eh->ether_shost), ntohs(eh->ether_type));
sys/arch/mips/ralink/ralink_eth.c
1543
ether_sprintf(eh->ether_shost), ntohs(eh->ether_type));
sys/arch/pmax/stand/common/if_prom.c
259
if (ntohs(eh->ether_type) == 0x0800) {
sys/arch/pmax/stand/common/if_prom.c
287
printf("ether_type = 0x%x\n", ntohs(eh->ether_type));
sys/arch/pmax/stand/common/if_prom.c
289
if (ntohs(eh->ether_type) == 0x0800) {
sys/arch/powerpc/ibm4xx/dev/if_emac.c
1031
switch (ntohs(eh->ether_type)) {
sys/arch/powerpc/ibm4xx/dev/if_emac.c
1115
switch (ntohs(eh->ether_type)) {
sys/arch/powerpc/ibm4xx/dev/if_emac.c
898
switch (ntohs(eh->ether_type)) {
sys/arch/powerpc/ibm4xx/dev/if_emac.c
912
if (ntohs(ip->ip_len) < 40)
sys/arch/powerpc/ibm4xx/dev/if_emac.c
921
if (ntohs(ip->ip_len) != m0->m_pkthdr.len - sizeof(*eh))
sys/arch/powerpc/ibm4xx/dev/if_emac.c
945
if (ntohs(ip6->ip6_plen) !=
sys/arch/sgimips/mace/if_mec.c
1765
if (ntohs(eh->ether_type) != ETHERTYPE_IP)
sys/arch/sgimips/mace/if_mec.c
1779
if (ntohs(ip->ip_len) < hlen ||
sys/arch/sgimips/mace/if_mec.c
1780
ntohs(ip->ip_len) != pktlen ||
sys/arch/sgimips/mace/if_mec.c
1781
(ntohs(ip->ip_off) & (IP_MF | IP_OFFMASK)) != 0)
sys/arch/sgimips/mace/if_mec.c
1815
dsum += ntohs(*dp++);
sys/arch/sgimips/stand/undist/undist.c
392
return ntohs(filename_len);
sys/arch/usermode/usermode/thunk.c
1360
inet_ntoa(sin.sin_addr), ntohs(sin.sin_port));
sys/arch/usermode/usermode/thunk.c
1424
msg_len = 4 * ntohs(*(uint16_t *)&set_encodings[1]);
sys/arch/usermode/usermode/thunk.c
1470
ntohs(*(uint16_t *)&pointer_event[1]);
sys/arch/usermode/usermode/thunk.c
1472
ntohs(*(uint16_t *)&pointer_event[3]);
sys/arch/xen/xen/xennet_checksum.c
107
etype = ntohs(evl->evl_proto);
sys/arch/xen/xen/xennet_checksum.c
119
iplen = ntohs(iph->ip_len);
sys/arch/xen/xen/xennet_checksum.c
134
iplen = ntohs(ip6h->ip6_plen);
sys/dev/hyperv/if_hvn.c
1283
if (eh->ether_type == ntohs(ETHERTYPE_VLAN))
sys/dev/hyperv/if_hvn.c
1309
!(ntohs(ip->ip_off) & IP_DF)) {
sys/dev/hyperv/if_hvn.c
1493
vlan_set_tag(m, ntohs(evl->evl_tag));
sys/dev/ic/am7990.c
557
ntohs(eh.ether_type));
sys/dev/ic/am7990.c
582
ntohs(eh.ether_type));
sys/dev/ic/am79900.c
577
ntohs(eh.ether_type));
sys/dev/ic/am79900.c
601
ntohs(eh.ether_type));
sys/dev/ic/an.c
838
ntohs(len) + sizeof(struct ieee80211_frame),
sys/dev/ic/bwfm.c
2152
ntohs(e->ehdr.ether_type) == BWFM_ETHERTYPE_LINK_CTL &&
sys/dev/ic/bwfm.c
2154
ntohs(e->hdr.usr_subtype) == BWFM_BRCM_SUBTYPE_EVENT) {
sys/dev/ic/gem.c
1510
switch (ntohs(eh->ether_type)) {
sys/dev/ic/gem.c
1863
if (ntohs(eh->ether_type) != ETHERTYPE_IP)
sys/dev/ic/gem.c
1879
if ((ntohs(ip->ip_len) < hlen) ||
sys/dev/ic/gem.c
1880
(ntohs(ip->ip_len) != pktlen) ||
sys/dev/ic/gem.c
1881
(ntohs(ip->ip_off) & (IP_MF | IP_OFFMASK)))
sys/dev/ic/gem.c
1912
optsum += ntohs(*opts++);
sys/dev/ic/hd64570.c
1583
switch (ntohs(hdlc->h_proto)) {
sys/dev/ic/hd64570.c
1644
ntohs(cisco->rel), ntohs(cisco->time0),
sys/dev/ic/hd64570.c
1645
ntohs(cisco->time1)));
sys/dev/ic/hd64570.c
1685
ntohs(hdlc->h_proto)));
sys/dev/ic/hme.c
755
if (ntohs(eh->ether_type) == ETHERTYPE_IP) {
sys/dev/ic/hme.c
758
} else if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) {
sys/dev/ic/hme.c
760
if (ntohs(evh->evl_proto) != ETHERTYPE_IP)
sys/dev/ic/hme.c
781
if (ntohs(ip->ip_len) < hlen ||
sys/dev/ic/hme.c
782
ntohs(ip->ip_len) != pktlen ||
sys/dev/ic/hme.c
783
(ntohs(ip->ip_off) & (IP_MF | IP_OFFMASK)) != 0)
sys/dev/ic/hme.c
828
optsum += ntohs(*opts++);
sys/dev/ic/hme.c
923
switch (ntohs(eh->ether_type)) {
sys/dev/ic/i82557.c
1252
if (ntohs(eh->ether_type) != ETHERTYPE_IP)
sys/dev/ic/i82557.c
1266
if (ntohs(ip->ip_len) < hlen ||
sys/dev/ic/i82557.c
1267
ntohs(ip->ip_len) != pktlen ||
sys/dev/ic/i82557.c
1268
(ntohs(ip->ip_off) & (IP_MF | IP_OFFMASK)) != 0)
sys/dev/ic/i82557.c
1313
hsum += ntohs(*iphdr++);
sys/dev/ic/i82586.c
1029
(u_int)ntohs(eh->ether_type),
sys/dev/ic/rtl8169.c
570
ntohs(eh->ether_type) != ETHERTYPE_IP) {
sys/dev/ic/rtl8169.c
581
ether_sprintf(eh->ether_shost), ntohs(eh->ether_type));
sys/dev/ic/tulip.c
1365
uint16_t etype = ntohs(eh->ether_type);
sys/dev/ieee1394/if_fwip.c
641
ntohs(destfw->sender_unicast_FIFO_hi);
sys/dev/ieee1394/sbp.c
1809
ntohs(sbp_status->orb_hi), ntohl(sbp_status->orb_lo));
sys/dev/ieee1394/sbp.c
1869
login_res->len = ntohs(login_res->len);
sys/dev/ieee1394/sbp.c
1870
login_res->id = ntohs(login_res->id);
sys/dev/ieee1394/sbp.c
1871
login_res->cmd_hi = ntohs(login_res->cmd_hi);
sys/dev/ieee1394/sbp.c
1883
ntohs(login_res->recon_hold));
sys/dev/iscsi/iscsi_rcv.c
579
refconn->c_Time2Wait = ntohs(pdu->pdu_hdr.pduh_p.logout_rsp.Time2Wait);
sys/dev/iscsi/iscsi_rcv.c
580
refconn->c_Time2Retain = ntohs(pdu->pdu_hdr.pduh_p.logout_rsp.Time2Retain);
sys/dev/iscsi/iscsi_rcv.c
742
ntohs(*((uint16_t *) pdu->pdu_temp_data)));
sys/dev/iscsi/iscsi_rcv.c
840
ntohs(pdu->pdu_hdr.pduh_p.asynch.Parameter1));
sys/dev/iscsi/iscsi_rcv.c
843
ntohs(pdu->pdu_hdr.pduh_p.asynch.Parameter2);
sys/dev/iscsi/iscsi_rcv.c
845
ntohs(pdu->pdu_hdr.pduh_p.asynch.Parameter3);
sys/dev/iscsi/iscsi_rcv.c
853
ntohs(pdu->pdu_hdr.pduh_p.asynch.Parameter2);
sys/dev/iscsi/iscsi_rcv.c
855
ntohs(pdu->pdu_hdr.pduh_p.asynch.Parameter3);
sys/dev/pci/cxgb/cxgb_lro.c
122
cpl->csum != 0xffff || eh->ether_type != ntohs(ETHERTYPE_IP) ||
sys/dev/pci/cxgb/cxgb_lro.c
160
int ip_len = ntohs(ih->ip_len);
sys/dev/pci/cxgb/cxgb_lro.c
282
plen = ntohs(nih->ip_len) - tcpiphlen;
sys/dev/pci/cxgb/cxgb_sge.c
2167
vlan_set_tag(ntohs(cpl->vlan));
sys/dev/pci/if_alc.c
2641
vlan_set_tag(m, ntohs(vtag));
sys/dev/pci/if_ena.c
2707
etype = ntohs(eh->evl_proto);
sys/dev/pci/if_stge.c
1387
etype = ntohs(eh->ether_type);
sys/dev/pci/if_stge.c
965
uint16_t etype = ntohs(eh->ether_type);
sys/dev/pci/if_ti.c
1981
switch (ntohs(eh->ether_type)) {
sys/dev/pci/igc/if_igc.c
3253
switch (ntohs(ehtype)) {
sys/dev/pci/ixgbe/ix_txrx.c
1023
switch (ntohs(eh_type)) {
sys/dev/pci/ixgbe/ix_txrx.c
1055
__func__, ntohs(eh_type));
sys/dev/pci/ixgbe/ix_txrx.c
886
etype = ntohs(eh->evl_proto);
sys/dev/pci/ixgbe/ix_txrx.c
889
etype = ntohs(eh->evl_encap_proto);
sys/dev/pci/ixgbe/ixgbe_osdep.h
136
#define IXGBE_NTOHS(_i) ntohs(_i)
sys/dev/pcmcia/if_ray.c
1136
et = ntohs(eh->ether_type);
sys/dev/qbus/if_dmc.c
611
dh->dmc_type = ntohs((u_short)dh->dmc_type);
sys/dev/scsipi/if_dse.c
857
ntohs(((struct ether_header *)data)->ether_type));
sys/dev/scsipi/if_se.c
735
ntohs(((struct ether_header *)data)->ether_type));
sys/dev/usb/if_smsc.c
987
csum_data = ntohs(csum_data);
sys/dev/usb/uhso.c
2155
want = ntohs(mtod(m, struct ip *)->ip_len);
sys/dist/pf/net/if_pfsync.h
221
(d)->max_win = ntohs((s)->max_win); \
sys/dist/pf/net/if_pfsync.h
222
(d)->mss = ntohs((s)->mss); \
sys/dist/pf/net/if_pfsync.h
228
ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \
sys/dist/pf/net/pf.c
1205
p = ntohs(p);
sys/dist/pf/net/pf.c
1243
b = ntohs(addr->addr16[i]);
sys/dist/pf/net/pf.c
1250
p = ntohs(p);
sys/dist/pf/net/pf.c
2731
tmp_nport = ((ntohs(dport) -
sys/dist/pf/net/pf.c
2732
ntohs(r->dst.port[0])) %
sys/dist/pf/net/pf.c
3446
ntohs(hip->ip_len) - off, IPPROTO_TCP, AF_INET))
sys/dist/pf/net/pf.c
3449
ntohs(hip->ip_len) - off, IPPROTO_TCP, AF_INET))
sys/dist/pf/net/pf.c
3559
s->src.max_win = MAX(ntohs(th->th_win), 1);
sys/dist/pf/net/pf.c
3822
u_int16_t win = ntohs(th->th_win);
sys/dist/pf/net/pf.c
3899
(*state)->src.max_win = MAX(ntohs(th->th_win), 1);
sys/dist/pf/net/pf.c
3914
(*state)->dst.max_win = MAX(ntohs(th->th_win), 1);
sys/dist/pf/net/pf.c
5025
u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
sys/dist/pf/net/pf.c
5037
ntohs(h->ip_len) < off + len) {
sys/dist/pf/net/pf.c
5050
(ntohs(h->ip6_plen) + sizeof(struct ip6_hdr)) <
sys/dist/pf/net/pf.c
5372
if (ntohs(ip->ip_len) <= ifp->if_mtu) {
sys/dist/pf/net/pf.c
5794
pd.tot_len = ntohs(h->ip_len);
sys/dist/pf/net/pf.c
5848
ntohs(uh.uh_ulen) > m->m_pkthdr.len - off ||
sys/dist/pf/net/pf.c
5849
ntohs(uh.uh_ulen) < sizeof(struct udphdr)) {
sys/dist/pf/net/pf.c
6154
pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr);
sys/dist/pf/net/pf.c
6269
ntohs(uh.uh_ulen) > m->m_pkthdr.len - off ||
sys/dist/pf/net/pf.c
6270
ntohs(uh.uh_ulen) < sizeof(struct udphdr)) {
sys/dist/pf/net/pf_norm.c
1224
if (ntohs(h->ip6_plen) == 0)
sys/dist/pf/net/pf_norm.c
1227
plen = ntohs(h->ip6_plen);
sys/dist/pf/net/pf_norm.c
1240
if (ntohs(h->ip6_plen) == 0 || jumbolen)
sys/dist/pf/net/pf_norm.c
1242
plen = ntohs(h->ip6_plen);
sys/dist/pf/net/pf_norm.c
1246
fragoff = ntohs(frag.ip6f_offlg & IP6F_OFF_MASK);
sys/dist/pf/net/pf_norm.c
1907
if ((ntohs(*mss)) > r->max_mss) {
sys/dist/pf/net/pf_norm.c
356
#define FR_IP_OFF(fr) ((ntohs((fr)->fr_ip->ip_off) & IP_OFFMASK) << 3)
sys/dist/pf/net/pf_norm.c
366
u_int16_t off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/dist/pf/net/pf_norm.c
367
u_int16_t ip_len = ntohs(ip->ip_len) - ip->ip_hl * 4;
sys/dist/pf/net/pf_norm.c
416
FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl *
sys/dist/pf/net/pf_norm.c
421
precut = FR_IP_OFF(frep) + ntohs(frep->fr_ip->ip_len) -
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
429
off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/dist/pf/net/pf_norm.c
441
if (aftercut < ntohs(frea->fr_ip->ip_len) - frea->fr_ip->ip_hl
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
482
off += ntohs(frep->fr_ip->ip_len) - frep->fr_ip->ip_hl * 4;
sys/dist/pf/net/pf_norm.c
548
DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip->ip_len)));
sys/dist/pf/net/pf_norm.c
565
int ip_len = ntohs(h->ip_len) - (h->ip_hl << 2);
sys/dist/pf/net/pf_norm.c
566
u_int16_t off = ntohs(h->ip_off) << 3;
sys/dist/pf/net/pf_norm.c
685
ntohs(h->ip_len) - precut);
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
742
ntohs(h->ip_len) - aftercut);
sys/dist/pf/net/pf_norm.c
743
h->ip_len = htons(ntohs(h->ip_len) - aftercut);
sys/dist/pf/net/pf_norm.c
864
int mff = (ntohs(h->ip_off) & IP_MF);
sys/dist/pf/net/pf_norm.c
866
u_int16_t fragoff = (ntohs(h->ip_off) & IP_OFFMASK) << 3;
sys/dist/pf/net/pf_norm.c
904
if (hlen > ntohs(h->ip_len))
sys/dist/pf/net/pf_norm.c
928
ip_len = ntohs(h->ip_len) - hlen;
sys/dist/pf/net/pf_osfp.c
147
fp.fp_psize = ntohs(ip->ip_len);
sys/dist/pf/net/pf_osfp.c
170
fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
sys/dist/pf/net/pf_osfp.c
190
fp.fp_wsize = ntohs(tcp->th_win);
sys/dist/pf/net/pf_osfp.c
252
srcname, ntohs(tcp->th_sport),
sys/dist/pf/net/pfvar.h
862
(d)->mss = ntohs((s)->mss); \
sys/dist/pf/net/pfvar.h
868
ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \
sys/fs/nfs/server/nfs_nfsdkrpc.c
181
port = ntohs(sin->sin_port);
sys/fs/nfs/server/nfs_nfsdport.c
2835
ntohs(saddr->sin_port) >= IPPORT_RESERVED) ||
sys/fs/nfs/server/nfs_nfsdport.c
2837
ntohs(saddr6->sin6_port) >= IPPORT_RESERVED))) {
sys/kern/subr_tftproot.c
391
switch(ntohs(tftp->th_opcode)) {
sys/kern/subr_tftproot.c
410
ntohs(tftp->th_code), errbuf);
sys/kern/subr_tftproot.c
418
__func__, __LINE__, ntohs(tftp->th_opcode)));
sys/kern/subr_tftproot.c
433
if (ntohs(tftp->th_block) != trh->trh_block) {
sys/kern/subr_tftproot.c
435
__func__, __LINE__, trh->trh_block, ntohs(tftp->th_block)));
sys/kern/uipc_mbufdebug.c
247
(*pr)("ETHER: TYPE = 0x%04x(", ntohs(eh.ether_type));
sys/kern/uipc_mbufdebug.c
248
switch (ntohs(eh.ether_type)) {
sys/kern/uipc_mbufdebug.c
316
if (ntohs(pt.tag) == PPPOE_TAG_EOL)
sys/kern/uipc_mbufdebug.c
318
off += ntohs(pt.len);
sys/kern/uipc_mbufdebug.c
348
(*pr)("PPPoE: Session = 0x%04x\n", ntohs(ph.session));
sys/kern/uipc_mbufdebug.c
349
(*pr)("PPPoE: Payload Length = %u\n", ntohs(ph.plen));
sys/kern/uipc_mbufdebug.c
390
protocol = ntohs(h.protocol);
sys/kern/uipc_mbufdebug.c
483
hrd = ntohs(ar.ar_hrd);
sys/kern/uipc_mbufdebug.c
497
(*pr)("ARP: Protocol Address Format = %u\n", ntohs(ar.ar_pro));
sys/kern/uipc_mbufdebug.c
500
op = ntohs(ar.ar_op);
sys/kern/uipc_mbufdebug.c
584
(*pr)("IP: Packet Length = %u\n", ntohs(ip.ip_len));
sys/kern/uipc_mbufdebug.c
585
(*pr)("IP: ID = %u\n", ntohs(ip.ip_id));
sys/kern/uipc_mbufdebug.c
586
offset = ntohs(ip.ip_off);
sys/kern/uipc_mbufdebug.c
598
(*pr)("IP: checksum = 0x%04x\n", ntohs(ip.ip_sum));
sys/kern/uipc_mbufdebug.c
694
(*pr)("IPv6: Payload Length = %u\n", ntohs(ip6.ip6_plen));
sys/kern/uipc_mbufdebug.c
828
(*pr)("TCP: Src = %u\n", ntohs(tcp.th_sport));
sys/kern/uipc_mbufdebug.c
829
(*pr)("TCP: Dst = %u\n", ntohs(tcp.th_dport));
sys/kern/uipc_mbufdebug.c
853
(*pr)("TCP: Windows Size = %u\n", ntohs(tcp.th_win));
sys/kern/uipc_mbufdebug.c
854
(*pr)("TCP: checksum = 0x%04x\n", ntohs(tcp.th_sum));
sys/kern/uipc_mbufdebug.c
855
(*pr)("TCP: Urgent Pointer = %u\n", ntohs(tcp.th_urp));
sys/kern/uipc_mbufdebug.c
897
ntohs(mss));
sys/kern/uipc_mbufdebug.c
963
(*pr)("UDP: Src = %u\n", ntohs(udp.uh_sport));
sys/kern/uipc_mbufdebug.c
964
(*pr)("UDP: Dst = %u\n", ntohs(udp.uh_dport));
sys/kern/uipc_mbufdebug.c
965
(*pr)("UDP: Length = %u\n", ntohs(udp.uh_ulen));
sys/lib/libsa/bootparam.c
185
inet_ntoa(bp_server_addr), ntohs((uint16_t)bp_server_port)));
sys/lib/libsa/bootparam.c
191
(int)ntohs((uint16_t)bp_server_port));
sys/lib/libsa/ether.c
120
*etype = ntohs(eh->ether_type);
sys/lib/libsa/ip.c
157
if (ntohs(ip->ip_len) < hlen) {
sys/lib/libsa/ip.c
160
if (n < ntohs(ip->ip_len)) {
sys/lib/libsa/ip.c
167
return (ntohs(ip->ip_len) - hlen);
sys/lib/libsa/rarp.c
220
printf("bad op=0x%x\n", ntohs(ap->arp_op));
sys/lib/libsa/tftp.c
115
switch (ntohs(t->th_opcode)) {
sys/lib/libsa/tftp.c
117
if (ntohs(t->th_block) != d->xid) {
sys/lib/libsa/tftp.c
133
if ((unsigned int)ntohs(t->th_code) >= 8) {
sys/lib/libsa/tftp.c
134
printf("illegal tftp error %d\n", ntohs(t->th_code));
sys/lib/libsa/tftp.c
138
printf("tftp-error %d\n", ntohs(t->th_code));
sys/lib/libsa/tftp.c
140
errno = tftperrors[ntohs(t->th_code)];
sys/lib/libsa/tftp.c
145
printf("tftp type %d not handled\n", ntohs(t->th_opcode));
sys/lib/libsa/udp.c
120
ntohs(d->myport), ntohs(uh->uh_dport));
sys/lib/libsa/udp.c
125
if (ntohs(uh->uh_ulen) < sizeof(*uh)) {
sys/lib/libsa/udp.c
129
ntohs(uh->uh_ulen), sizeof(*uh));
sys/lib/libsa/udp.c
77
inet_ntoa(d->myip), ntohs(d->myport));
sys/lib/libsa/udp.c
79
inet_ntoa(d->destip), ntohs(d->destport));
sys/net/bridgestp.c
602
len = ntohs(eh->ether_type);
sys/net/bridgestp.c
639
(((uint64_t)ntohs(cpdu.cbu_rootpri)) << 48) |
sys/net/bridgestp.c
648
(((uint64_t)ntohs(cpdu.cbu_bridgepri)) << 48) |
sys/net/bridgestp.c
657
cu.cu_message_age = ntohs(cpdu.cbu_messageage);
sys/net/bridgestp.c
658
cu.cu_max_age = ntohs(cpdu.cbu_maxage);
sys/net/bridgestp.c
659
cu.cu_hello_time = ntohs(cpdu.cbu_hellotime);
sys/net/bridgestp.c
660
cu.cu_forward_delay = ntohs(cpdu.cbu_forwarddelay);
sys/net/bridgestp.c
661
cu.cu_port_id = ntohs(cpdu.cbu_portid);
sys/net/ether_sw_offload.c
101
switch (type = ntohs(ep->ether_type)) {
sys/net/ether_sw_offload.c
269
if (ntohs(ip->ip_off) & ~(IP_DF | IP_RF))
sys/net/if_arcsubr.c
182
switch (ntohs(arph->ar_op)) {
sys/net/if_arp.h
100
if (ntohs(ap->ar_hrd) == ARPHRD_IEEE1394) {
sys/net/if_arp.h
110
if (ntohs(ap->ar_hrd) == ARPHRD_IEEE1394) {
sys/net/if_bridge.c
2728
ether_type = ntohs(eh1->ether_type);
sys/net/if_bridge.c
2903
len = ntohs(ip->ip_len);
sys/net/if_ethersubr.c
1907
KASSERT(ntohs(evl->evl_encap_proto) == ETHERTYPE_VLAN);
sys/net/if_ethersubr.c
1909
vlan_set_tag(m, ntohs(evl->evl_tag));
sys/net/if_ethersubr.c
1922
vlan_set_tag(m, ntohs(evl->evl_tag));
sys/net/if_ethersubr.c
316
switch (ntohs(ah->ar_op)) {
sys/net/if_ethersubr.c
630
ntohs(l->llc_snap_ether_type) ==
sys/net/if_ethersubr.c
641
ntohs(l->llc_snap_ether_type) ==
sys/net/if_ethersubr.c
713
etype = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
775
etype = ntohs(eh->ether_type);
sys/net/if_ethersubr.c
793
etype = ntohs(eh->ether_type);
sys/net/if_gre.c
799
flags = ntohs(gh->flags);
sys/net/if_gre.c
814
switch (ntohs(gh->ptype)) { /* ethertypes */
sys/net/if_gre.c
841
ntohs(gh->ptype));
sys/net/if_ieee1394subr.c
340
if (ntohs(iuh->iuh_ft) & (IEEE1394_FT_SUBSEQ | IEEE1394_FT_MORE)) {
sys/net/if_ieee1394subr.c
345
etype = ntohs(iuh->iuh_etype);
sys/net/if_ieee1394subr.c
418
size = ntohs(ifh->ifh_ft_size);
sys/net/if_ieee1394subr.c
421
dgl = ntohs(ifh->ifh_dgl);
sys/net/if_ieee1394subr.c
427
off = ntohs(ifh->ifh_etype_off);
sys/net/if_l2tp.c
1469
switch (ntohs(eh->ether_type)) {
sys/net/if_l2tp.c
1474
switch (ntohs(evh.evl_proto)) {
sys/net/if_pppoe.c
1180
session = ntohs(ph->session);
sys/net/if_pppoe.c
1208
plen = ntohs(ph->plen);
sys/net/if_pppoe.c
683
session = ntohs(ph->session);
sys/net/if_pppoe.c
684
plen = ntohs(ph->plen);
sys/net/if_pppoe.c
703
tag = ntohs(pt->tag);
sys/net/if_pppoe.c
704
len = ntohs(pt->len);
sys/net/if_spppsubr.c
1531
pname, cpname, lh->ident, ntohs(lh->len));
sys/net/if_spppsubr.c
1680
printlen = ntohs(h->len);
sys/net/if_spppsubr.c
1691
if (len > ntohs(h->len))
sys/net/if_spppsubr.c
1692
len = ntohs(h->len);
sys/net/if_spppsubr.c
2219
len = MIN(m->m_pkthdr.len, ntohs(h->len));
sys/net/if_spppsubr.c
2301
len = MIN(m->m_pkthdr.len, ntohs(h->len));
sys/net/if_spppsubr.c
4649
if (len > ntohs(h->len))
sys/net/if_spppsubr.c
4650
len = ntohs(h->len);
sys/net/if_spppsubr.c
4673
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
4687
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
4799
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
4839
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
4886
h->type, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
5074
if (len > ntohs(h->len))
sys/net/if_spppsubr.c
5075
len = ntohs(h->len);
sys/net/if_spppsubr.c
5096
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
5110
authname, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
5202
h->type, h->ident, ntohs(h->len));
sys/net/if_spppsubr.c
5345
lh->ident, ntohs(lh->len));
sys/net/if_spppsubr.c
670
protocol = ntohs(protocol);
sys/net/if_spppsubr.c
688
h->address, h->control, ntohs(h->protocol));
sys/net/if_spppsubr.c
694
h->address, h->control, ntohs(h->protocol));
sys/net/if_spppsubr.c
697
protocol = ntohs(h->protocol);
sys/net/if_spppsubr.c
936
(th && (INTERACTIVE(ntohs(th->th_sport)) ||
sys/net/if_spppsubr.c
937
INTERACTIVE(ntohs(th->th_dport))))))
sys/net/if_stf.c
126
#define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002)
sys/net/if_vlan.c
1270
if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) {
sys/net/if_vlan.c
1363
if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) {
sys/net/if_wg.c
2541
be16enc(uh_sport, ntohs(sin->sin_port));
sys/net/if_wg.c
2550
be16enc(uh_sport, ntohs(sin6->sin6_port));
sys/net/if_wg.c
2868
packet_len = ntohs(ip->ip_len);
sys/net/if_wg.c
2882
packet_len = sizeof(*ip6) + ntohs(ip6->ip6_plen);
sys/net/lagg/if_lagg.c
919
etype = ntohs(eh->ether_type);
sys/net/lagg/if_lagg.c
927
vlantag = ntohs(evl->evl_tag);
sys/net/lagg/if_lagg.c
928
etype = ntohs(evl->evl_proto);
sys/net/lagg/if_lagg_lacp.c
1591
(unsigned int)ntohs(prio),
sys/net/lagg/if_lagg_lacp.c
243
#define LACP_SYS_PRI(_la) ntohs((_la)->la_sid.sid_prio)
sys/net/lagg/if_lagg_lacp.c
2629
mdu->mdu_eh.ether_type = ntohs(ETHERTYPE_SLOWPROTOCOLS);
sys/net/lagg/if_lagg_lacp.c
2698
ntohs(pi_actor->lpi_port_no),
sys/net/lagg/if_lagg_lacp.c
2699
ntohs(pi_actor->lpi_port_prio));
sys/net/lagg/if_lagg_lacp.c
2711
ntohs(pi_partner->lpi_port_no),
sys/net/lagg/if_lagg_lacp.c
2712
ntohs(pi_partner->lpi_port_prio));
sys/net/lagg/if_lagg_lacp.c
2718
printf("maxdelay=%d\n", ntohs(lci->lci_maxdelay));
sys/net/lagg/if_lagg_lacp.c
2731
ntohs(mi_info->mi_rq_port),
sys/net/lagg/if_lagg_lacp.c
2738
ntohs(mi_res->mi_rq_port),
sys/net/lagg/if_lagg_lacp.c
402
pri_a = ntohs(a->lp_actor.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
403
pri_b = ntohs(b->lp_actor.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
410
pri_a = ntohs(a->lp_partner.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
411
pri_b = ntohs(b->lp_partner.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
708
lp->lp_prio = ntohs(lacpp->lp_actor.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
798
rplacp->actor_prio = ntohs(lsc->lsc_system_prio);
sys/net/lagg/if_lagg_lacp.c
801
rplacp->actor_key = ntohs(lsc->lsc_key);
sys/net/lagg/if_lagg_lacp.c
805
rplacp->partner_prio = ntohs(sid->sid_prio);
sys/net/lagg/if_lagg_lacp.c
808
rplacp->partner_key = ntohs(sid->sid_key);
sys/net/lagg/if_lagg_lacp.c
839
llp->partner_prio = ntohs(sid->sid_prio);
sys/net/lagg/if_lagg_lacp.c
842
llp->partner_key = ntohs(sid->sid_key);
sys/net/lagg/if_lagg_lacp.c
845
llp->actor_portprio = ntohs(lacpp->lp_actor.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
846
llp->actor_portno = ntohs(lacpp->lp_actor.lpi_portno);
sys/net/lagg/if_lagg_lacp.c
849
llp->partner_portprio = ntohs(lacpp->lp_partner.lpi_portprio);
sys/net/lagg/if_lagg_lacp.c
850
llp->partner_portno = ntohs(lacpp->lp_partner.lpi_portno);
sys/net/npf/npf_alg_icmp.c
91
dport = ntohs(th->th_dport);
sys/net/npf/npf_alg_icmp.c
96
dport = ntohs(uh->uh_dport);
sys/net/npf/npf_ext_normalize.c
178
if (ntohs(mss) <= maxmss) {
sys/net/npf/npf_ext_route.c
168
if (ntohs(ip->ip_off) & IP_DF) {
sys/net/npf/npf_ext_route.c
393
if (ntohs(ip->ip_len) > ifp->if_mtu)
sys/net/npf/npf_inet.c
259
*win = (uint32_t)ntohs(th->th_win);
sys/net/npf/npf_inet.c
264
return ntohs(ip->ip_len) - npc->npc_hlen - thlen;
sys/net/npf/npf_inet.c
267
return ntohs(ip6->ip6_plen) -
sys/net/npf/npf_inet.c
514
if (!ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK) &&
sys/net/npf/npf_nat.c
1008
np->n_type, np->n_flags, inet_ntoa(ip), ntohs(np->n_tport));
sys/net/npf/npf_nat.c
1011
inet_ntoa(ip), ntohs(nt->nt_oport), ntohs(nt->nt_tport));
sys/net/npf/npf_portmap.c
555
port = ntohs(port);
sys/net/npf/npf_portmap.c
576
port = ntohs(port);
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
294
deltaS = ntohs(th->th_urp);
sys/net/slcompress.c
305
deltaS = (uint16_t)(ntohs(th->th_win) - ntohs(oth->th_win));
sys/net/slcompress.c
338
ntohs(cs->cs_ip.ip_len) == hlen)
sys/net/slcompress.c
353
deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
sys/net/slcompress.c
361
if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) {
sys/net/slcompress.c
369
deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
sys/net/slcompress.c
380
deltaA = ntohs(th->th_sum);
sys/net/slcompress.c
557
u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
sys/net/slcompress.c
564
th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len)
sys/net/slcompress.c
585
cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1);
sys/netatalk/aarp.c
152
&& (ntohs(nr->nr_firstnet) <= ntohs(sat->sat_addr.s_net))
sys/netatalk/aarp.c
153
&& (ntohs(nr->nr_lastnet) >= ntohs(sat->sat_addr.s_net)))
sys/netatalk/aarp.c
237
ntohs(AA_SAT(aa)->sat_addr.s_net),
sys/netatalk/aarp.c
240
ntohs(sat->sat_addr.s_net),
sys/netatalk/aarp.c
321
if (ntohs(ar->ar_hrd) != AARPHRD_ETHER)
sys/netatalk/aarp.c
327
switch (ntohs(ar->ar_pro)) {
sys/netatalk/aarp.c
369
op = ntohs(ea->aarp_op);
sys/netatalk/aarp.c
667
ntohs(AA_SAT(aa)->sat_addr.s_net),
sys/netatalk/at_control.c
369
ntohs(aa->aa_firstnet), ntohs(aa->aa_lastnet),
sys/netatalk/at_control.c
406
nnets = ntohs(nr.nr_lastnet) - ntohs(nr.nr_firstnet) + 1;
sys/netatalk/at_control.c
413
ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node,
sys/netatalk/at_control.c
414
ntohs(aa->aa_firstnet), ntohs(aa->aa_lastnet),
sys/netatalk/at_control.c
458
net = ntohs(nr.nr_firstnet) +
sys/netatalk/at_control.c
461
net = ntohs(nr.nr_firstnet);
sys/netatalk/at_control.c
469
if (ntohs(sat->sat_addr.s_net) <
sys/netatalk/at_control.c
470
ntohs(nr.nr_firstnet) ||
sys/netatalk/at_control.c
471
ntohs(sat->sat_addr.s_net) >
sys/netatalk/at_control.c
472
ntohs(nr.nr_lastnet)) {
sys/netatalk/at_control.c
482
net = ntohs(sat->sat_addr.s_net);
sys/netatalk/at_control.c
490
net = ntohs(sat->sat_addr.s_net);
sys/netatalk/at_control.c
507
for (i = nnets, netinc = 1; i > 0; net = ntohs(nr.nr_firstnet) +
sys/netatalk/at_control.c
508
((net - ntohs(nr.nr_firstnet) + netinc) % nnets), i--) {
sys/netatalk/at_control.c
621
ntohs(aa->aa_firstnet), ntohs(aa->aa_lastnet), RTM_ADD);
sys/netatalk/at_control.c
687
&& (ntohs(sat->sat_addr.s_net) >= ntohs(aa->aa_firstnet)
sys/netatalk/at_control.c
688
&& ntohs(sat->sat_addr.s_net) <= ntohs(aa->aa_lastnet)))
sys/netatalk/at_control.c
762
ntohs(addr->s_net), addr->s_node,
sys/netatalk/at_control.c
763
ntohs(mask->s_net), mask->s_node);
sys/netatalk/at_control.c
781
ntohs(addr->s_net), addr->s_node,
sys/netatalk/at_control.c
782
ntohs(mask->s_net), mask->s_node);
sys/netatalk/at_control.c
818
ntohs(gate->sat_addr.s_net), gate->sat_addr.s_node);
sys/netatalk/at_print.c
45
return snprintf(buf, len, "%hu.%hhu", ntohs(aa->s_net), aa->s_node);
sys/netatalk/ddp_input.c
223
if ((ntohs(to.sat_addr.s_net) <
sys/netatalk/ddp_input.c
224
ntohs(aa->aa_firstnet) ||
sys/netatalk/ddp_input.c
225
ntohs(to.sat_addr.s_net) >
sys/netatalk/ddp_input.c
226
ntohs(aa->aa_lastnet)) &&
sys/netatalk/ddp_input.c
227
(ntohs(to.sat_addr.s_net) < 0xff00 ||
sys/netatalk/ddp_input.c
228
ntohs(to.sat_addr.s_net) > 0xfffe))
sys/netatalk/ddp_output.c
135
if (ntohs(net) >= ntohs(aa->aa_firstnet) &&
sys/netatalk/ddp_output.c
136
ntohs(net) <= ntohs(aa->aa_lastnet)) {
sys/netatalk/ddp_output.c
177
if (ntohs(satocsat(rtcache_getdst(ro))->sat_addr.s_net) >=
sys/netatalk/ddp_output.c
178
ntohs(aa->aa_firstnet) &&
sys/netatalk/ddp_output.c
179
ntohs(satocsat(rtcache_getdst(ro))->sat_addr.s_net) <=
sys/netatalk/ddp_output.c
180
ntohs(aa->aa_lastnet)) {
sys/netatalk/ddp_output.c
188
if (ntohs(satocsat(rtcache_getdst(ro))->sat_addr.s_net) >=
sys/netatalk/ddp_output.c
189
ntohs(aa->aa_firstnet) &&
sys/netatalk/ddp_output.c
190
ntohs(satocsat(rtcache_getdst(ro))->sat_addr.s_net) <=
sys/netatalk/ddp_output.c
191
ntohs(aa->aa_lastnet)) {
sys/netatalk/ddp_usrreq.c
226
ntohs(net) >= ntohs(aa->aa_firstnet) &&
sys/netatalk/ddp_usrreq.c
227
ntohs(net) <= ntohs(aa->aa_lastnet)) {
sys/netatalk/ddp_usrreq.c
588
ntohs(ddp->ddp_lsat.sat_addr.s_net) >=
sys/netatalk/ddp_usrreq.c
589
ntohs(aa->aa_firstnet) &&
sys/netatalk/ddp_usrreq.c
590
ntohs(ddp->ddp_lsat.sat_addr.s_net) <=
sys/netatalk/ddp_usrreq.c
591
ntohs(aa->aa_lastnet)) {
sys/netinet/dccp_tfrc.c
1238
TFRC_DEBUG_TIME((LOG_INFO, "TFRC - Sending a feedback packet with (t_elapsed %u, pinv %x, x_recv %u, ack=%llu) (tfrc_recv_send_feedback)\n", ntohs(t_elapsed), ntohl(pinv), ntohl(x_recv), elm->seq));
sys/netinet/dccp_tfrc.c
878
t_elapsed = ntohs(t_elapsed);
sys/netinet/dccp_usrreq.c
265
dlh->dh_cscov, dlh->dh_off, dlh->dh_type, dlh->dh_res, ntohs(dlh->dh_seq),
sys/netinet/dccp_usrreq.c
284
len = ntohs(ip->ip_len);
sys/netinet/dccp_usrreq.c
389
dbuf, ntohs(dh->dh_dport), sbuf,
sys/netinet/dccp_usrreq.c
390
ntohs(dh->dh_sport));
sys/netinet/dccp_var.h
45
x = ((u_int64_t)ntohs(y->dh_seq) << 32) | ntohl(y->dh_seq2);\
sys/netinet/dccp_var.h
54
x = ((u_int64_t)ntohs(y.dah_ack) << 32) | ntohl(y.dah_ack2);\
sys/netinet/if_arp.c
1826
if (ntohs(ar->ar_hrd) == ARPHRD_IEEE1394) {
sys/netinet/if_arp.c
1835
switch (ntohs(ar->ar_pro)) {
sys/netinet/if_arp.c
1870
op = ntohs(ah->ar_op);
sys/netinet/if_arp.c
714
if (ntohs(ar->ar_hrd) == ARPHRD_IEEE1394)
sys/netinet/if_arp.c
734
switch (ntohs(ar->ar_pro)) {
sys/netinet/if_arp.c
792
op = ntohs(ah->ar_op);
sys/netinet/igmp.c
204
ip_len = ntohs(ip->ip_len);
sys/netinet/in_offload.c
234
ip_len = ntohs(ip_len);
sys/netinet/in_offload.c
284
csum = in4_cksum(m, 0, offset, ntohs(ip->ip_len) - offset);
sys/netinet/in_offload.c
83
ipid = ntohs(ip->ip_id);
sys/netinet/in_pcb.c
1098
ntohl(faddr.s_addr), ntohs(fport),
sys/netinet/in_pcb.c
1099
ntohl(laddr.s_addr), ntohs(lport));
sys/netinet/in_pcb.c
1146
ntohl(laddr.s_addr), ntohs(lport));
sys/netinet/in_pcb.c
145
&(table)->inpt_porthashtbl[ntohs(lport) & (table)->inpt_porthash]
sys/netinet/in_pcb.c
148
((ntohl((laddr).s_addr) + ntohs(lport))) & (table)->inpt_bindhash]
sys/netinet/in_pcb.c
151
((ntohl((faddr).s_addr) + ntohs(fport)) + \
sys/netinet/in_pcb.c
152
(ntohl((laddr).s_addr) + ntohs(lport))) & (table)->inpt_connecthash]
sys/netinet/in_pcb.c
403
if (ntohs(sin->sin_port) < IPPORT_RESERVED)
sys/netinet/in_print.c
60
return snprintf(buf, len, "%s:%hu", abuf, ntohs(sin->sin_port));
sys/netinet/ip_flow.c
238
iplen = ntohs(ip->ip_len);
sys/netinet/ip_icmp.c
1148
u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */
sys/netinet/ip_icmp.c
1182
mtu = ntohs(icp->icmp_ip.ip_len);
sys/netinet/ip_icmp.c
301
ntohs(oip->ip_len) - oiphlen);
sys/netinet/ip_icmp.c
431
icmplen = ntohs(ip->ip_len) - hlen;
sys/netinet/ip_icmp.c
911
ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
sys/netinet/ip_icmp.c
952
icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen);
sys/netinet/ip_input.c
1405
mcopy = m_copym(m, 0, imin(ntohs(ip->ip_len), 68), M_DONTWAIT);
sys/netinet/ip_input.c
526
len = ntohs(ip->ip_len);
sys/netinet/ip_input.c
805
_ia->ia_ifa.ifa_data.ifad_inbytes += ntohs(ip->ip_len);
sys/netinet/ip_mroute.c
1591
const int plen = ntohs(ip->ip_len) - (ip->ip_hl << 2);
sys/netinet/ip_mroute.c
1740
ntohs(ip->ip_len));
sys/netinet/ip_mroute.c
1748
int i, len = ntohs(ip->ip_len) + sizeof(multicast_encap_iphdr);
sys/netinet/ip_mroute.c
1805
tbf_control(vifp, mb_copy, ip, ntohs(ip_copy->ip_len));
sys/netinet/ip_mroute.c
1969
len = ntohs(mtod(m, struct ip *)->ip_len);
sys/netinet/ip_mroute.c
2118
switch (ntohs(udp->uh_dport) & 0xc000) {
sys/netinet/ip_mroute.c
2132
ntohs(udp->uh_dport), prio);
sys/netinet/ip_mroute.c
2794
if (ntohs(ip->ip_len) <= mtu) {
sys/netinet/ip_mroute.c
2816
int len = ntohs(ip->ip_len);
sys/netinet/ip_mroute.c
2873
int len = ntohs(ip->ip_len);
sys/netinet/ip_mroute.c
2913
if (ntohs(ip->ip_off) & IP_DF)
sys/netinet/ip_mroute.c
2929
tbf_control(vifp, mb_first, ip, ntohs(ip_outer->ip_len));
sys/netinet/ip_mroute.c
2957
datalen = ntohs(ip->ip_len) - iphlen;
sys/netinet/ip_mroute.c
3081
ntohs(encap_ip->ip_len));
sys/netinet/ip_mroute.c
3157
pimstat.pims_rcv_registers_bytes += ntohs(encap_ip->ip_len);
sys/netinet/ip_output.c
1017
if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET)
sys/netinet/ip_output.c
1043
ip->ip_len = htons(ntohs(ip->ip_len) + optlen);
sys/netinet/ip_output.c
577
if (ntohs(ip->ip_len) > ifp->if_mtu) {
sys/netinet/ip_output.c
604
unsigned int datasz = ntohs(ip->ip_len) - hlen;
sys/netinet/ip_output.c
700
if (ntohs(ip->ip_len) > mtu &&
sys/netinet/ip_output.c
707
ia->ia_ifa.ifa_data.ifad_outbytes += ntohs(ip->ip_len);
sys/netinet/ip_output.c
769
if (ntohs(ip->ip_off) & IP_DF) {
sys/netinet/ip_output.c
794
ia->ia_ifa.ifa_data.ifad_outbytes += ntohs(ip->ip_len);
sys/netinet/ip_output.c
853
ipoff = ntohs(ip->ip_off) & IP_OFFMASK;
sys/netinet/ip_output.c
854
ipflg = ntohs(ip->ip_off) & (IP_RF|IP_DF|IP_MF);
sys/netinet/ip_output.c
875
for (off = hlen + len; off < ntohs(ip->ip_len); off += len) {
sys/netinet/ip_output.c
902
if (off + len >= ntohs(ip->ip_len))
sys/netinet/ip_output.c
903
len = ntohs(ip->ip_len) - off;
sys/netinet/ip_output.c
943
m_adj(m, hlen + firstlen - ntohs(ip->ip_len));
sys/netinet/ip_reass.c
621
const int len = ntohs(ip->ip_len);
sys/netinet/ip_reass.c
634
off = (ntohs(ip->ip_off) & IP_OFFMASK) << 3;
sys/netinet/ip_reass.c
649
flen = ntohs(ip->ip_len) - hlen;
sys/netinet/raw_ip.c
181
ip->ip_len = ntohs(ip->ip_len) - hlen;
sys/netinet/sctp_asconf.c
1241
error_code = ntohs(eh->code);
sys/netinet/sctp_asconf.c
1242
param_type = ntohs(aph->ph.param_type);
sys/netinet/sctp_asconf.c
1343
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_ack_chunk)) {
sys/netinet/sctp_asconf.c
1347
ntohs(cp->ch.chunk_length));
sys/netinet/sctp_asconf.c
1392
ack_length = ntohs(cp->ch.chunk_length) -
sys/netinet/sctp_asconf.c
1407
param_type = ntohs(aph->ph.param_type);
sys/netinet/sctp_asconf.c
1408
param_length = ntohs(aph->ph.param_length);
sys/netinet/sctp_asconf.c
210
aparam_length = ntohs(aph->ph.param_length);
sys/netinet/sctp_asconf.c
215
param_type = ntohs(v4addr->ph.param_type);
sys/netinet/sctp_asconf.c
216
param_length = ntohs(v4addr->ph.param_length);
sys/netinet/sctp_asconf.c
2414
acp->ch.chunk_length = ntohs(m_asconf_chk->m_pkthdr.len);
sys/netinet/sctp_asconf.c
2475
ptype = ntohs(ph->param_type);
sys/netinet/sctp_asconf.c
2476
plen = ntohs(ph->param_length);
sys/netinet/sctp_asconf.c
2630
ptype = ntohs(ph->param_type);
sys/netinet/sctp_asconf.c
2631
plen = ntohs(ph->param_length);
sys/netinet/sctp_asconf.c
317
aparam_length = ntohs(aph->ph.param_length);
sys/netinet/sctp_asconf.c
322
param_type = ntohs(v4addr->ph.param_type);
sys/netinet/sctp_asconf.c
323
param_length = ntohs(v4addr->ph.param_length);
sys/netinet/sctp_asconf.c
472
aparam_length = ntohs(aph->ph.param_length);
sys/netinet/sctp_asconf.c
477
param_type = ntohs(v4addr->ph.param_type);
sys/netinet/sctp_asconf.c
478
param_length = ntohs(v4addr->ph.param_length);
sys/netinet/sctp_asconf.c
585
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_chunk)) {
sys/netinet/sctp_asconf.c
589
ntohs(cp->ch.chunk_length));
sys/netinet/sctp_asconf.c
622
asconf_limit = offset + ntohs(cp->ch.chunk_length);
sys/netinet/sctp_asconf.c
669
offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */
sys/netinet/sctp_asconf.c
688
param_type = ntohs(aph->ph.param_type);
sys/netinet/sctp_asconf.c
689
param_length = ntohs(aph->ph.param_length);
sys/netinet/sctp_indata.c
1793
strmno = ntohs(ch->dp.stream_id);
sys/netinet/sctp_indata.c
1832
strmseq = ntohs(ch->dp.stream_sequence);
sys/netinet/sctp_indata.c
1956
(int)(ntohs(stcb->rport)));
sys/netinet/sctp_indata.c
2587
chk_length = ntohs(ch->ch.chunk_length);
sys/netinet/sctp_indata.c
2728
frag_strt = ntohs(frag->start);
sys/netinet/sctp_indata.c
2729
frag_end = ntohs(frag->end);
sys/netinet/sctp_indata.c
3530
sack_length = ntohs(ch->ch.chunk_length);
sys/netinet/sctp_indata.c
3543
num_seg = ntohs(sack->num_gap_ack_blks);
sys/netinet/sctp_indata.c
4313
sack.ch.chunk_length = ntohs(sizeof(struct sctp_sack_chunk));
sys/netinet/sctp_indata.c
433
(int)(ntohs(stcb->rport)));
sys/netinet/sctp_indata.c
4426
if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) {
sys/netinet/sctp_indata.c
4643
st = ntohs(stseq[i].stream);
sys/netinet/sctp_indata.c
4645
st = ntohs(stseq[i].sequence);
sys/netinet/sctp_indata.c
655
(int)(ntohs(stcb->rport)));
sys/netinet/sctp_input.c
1102
chk_length = ntohs(init_cp->ch.chunk_length);
sys/netinet/sctp_input.c
1129
chk_length = ntohs(initack_cp->ch.chunk_length);
sys/netinet/sctp_input.c
116
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_chunk)) {
sys/netinet/sctp_input.c
1266
ntohs(initack_cp->init.num_outbound_streams);
sys/netinet/sctp_input.c
1341
ntohs(initack_cp->init.num_outbound_streams);
sys/netinet/sctp_input.c
1443
chk_length = ntohs(init_cp->ch.chunk_length);
sys/netinet/sctp_input.c
1470
chk_length = ntohs(initack_cp->ch.chunk_length);
sys/netinet/sctp_input.c
1530
asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams);
sys/netinet/sctp_input.c
1728
cookie_len = ntohs(cp->ch.chunk_length);
sys/netinet/sctp_input.c
184
if (asoc->pre_open_streams > ntohs(init->num_inbound_streams)) {
sys/netinet/sctp_input.c
190
newcnt = ntohs(init->num_inbound_streams);
sys/netinet/sctp_input.c
2225
if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_ecne_chunk)) {
sys/netinet/sctp_input.c
223
asoc->streamincnt = ntohs(init->num_outbound_streams);
sys/netinet/sctp_input.c
2609
temp = ntohs(list[i]);
sys/netinet/sctp_input.c
2641
if (strreq->sr_req.ph.param_type == ntohs(SCTP_STR_RESET_RESPONSE)) {
sys/netinet/sctp_input.c
2644
} else if (strreq->sr_req.ph.param_type != ntohs(SCTP_STR_RESET_REQUEST)) {
sys/netinet/sctp_input.c
2646
(u_int)ntohs(strreq->sr_req.ph.param_type));
sys/netinet/sctp_input.c
2677
param_length = ntohs(resp->ph.param_length);
sys/netinet/sctp_input.c
2729
chk_length = ntohs(sr_req->ch.chunk_length);
sys/netinet/sctp_input.c
2733
param_len = ntohs(ph->param_length);
sys/netinet/sctp_input.c
2734
if (ntohs(ph->param_type) == SCTP_STR_RESET_REQUEST) {
sys/netinet/sctp_input.c
2738
} else if (ntohs(ph->param_type) == SCTP_STR_RESET_RESPONSE) {
sys/netinet/sctp_input.c
2771
chlen = ntohs(cp->ch.chunk_length);
sys/netinet/sctp_input.c
2820
trunc_len = (u_int16_t)ntohs(cp->trunc_len);
sys/netinet/sctp_input.c
2825
at = ntohs(ch->chunk_length);
sys/netinet/sctp_input.c
3051
if (ntohs(ch->chunk_length) < sizeof(*ch)) {
sys/netinet/sctp_input.c
3174
chk_length = ntohs(ch->chunk_length);
sys/netinet/sctp_input.c
334
initack_limit = offset + ntohs(cp->ch.chunk_length);
sys/netinet/sctp_input.c
411
if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_heartbeat_chunk)) {
sys/netinet/sctp_input.c
528
if (ntohs(cp->ch.chunk_length) != sizeof(struct sctp_shutdown_chunk)) {
sys/netinet/sctp_input.c
533
ntohs(cp->ch.chunk_length),
sys/netinet/sctp_input.c
717
switch (ntohs(pbad->param_type)) {
sys/netinet/sctp_input.c
774
chklen = ntohs(ch->chunk_length) - sizeof(struct sctp_chunkhdr);
sys/netinet/sctp_input.c
777
error_type = ntohs(phdr->param_type);
sys/netinet/sctp_input.c
778
error_len = ntohs(phdr->param_length);
sys/netinet/sctp_input.c
910
if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_init_ack_chunk)) {
sys/netinet/sctp_output.c
2244
printf("length %d\n", ntohs(ip->ip_len));
sys/netinet/sctp_output.c
2853
printf("chunk_length %d\n", ntohs(initm->msg.ch.chunk_length));
sys/netinet/sctp_output.c
2922
limit = ntohs(cp->chunk_length) - sizeof(struct sctp_init_chunk);
sys/netinet/sctp_output.c
2933
ptype = ntohs(phdr->param_type);
sys/netinet/sctp_output.c
2934
plen = ntohs(phdr->param_length);
sys/netinet/sctp_output.c
3173
ptype = ntohs(phdr->param_type);
sys/netinet/sctp_output.c
3174
plen = ntohs(phdr->param_length);
sys/netinet/sctp_output.c
3607
his_limit = ntohs(init_chk->init.num_inbound_streams);
sys/netinet/sctp_output.c
3805
sz_of = SCTP_SIZE32(ntohs(init_chk->ch.chunk_length));
sys/netinet/sctp_output.c
4980
if (strreq->sr_req.ph.param_type == ntohs(SCTP_STR_RESET_RESPONSE)) {
sys/netinet/sctp_output.c
6051
ptype = ntohs(phdr->param_type);
sys/netinet/sctp_output.c
6052
plen = ntohs(phdr->param_length);
sys/netinet/sctp_output.c
6514
if (strreq->sr_req.ph.param_type != ntohs(SCTP_STR_RESET_REQUEST)) {
sys/netinet/sctp_output.c
7640
strseq->stream = ntohs(at->rec.data.stream_number);
sys/netinet/sctp_output.c
7641
strseq->sequence = ntohs(at->rec.data.stream_seq);
sys/netinet/sctp_output.c
8696
number_entries = (ntohs(req->ph.param_length) - sizeof(struct sctp_stream_reset_request)) / sizeof(uint16_t);
sys/netinet/sctp_output.c
8750
strack->sr_resp.ph.param_type = ntohs(SCTP_STR_RESET_RESPONSE);
sys/netinet/sctp_output.c
8792
temp = ntohs(list[i]);
sys/netinet/sctp_output.c
8901
strreq->sr_req.ph.param_type = ntohs(SCTP_STR_RESET_REQUEST);
sys/netinet/sctp_pcb.c
1000
plen = ntohs(phdr->param_length);
sys/netinet/sctp_pcb.c
1183
ntohs(((struct sockaddr_in *)to)->sin_port));
sys/netinet/sctp_pcb.c
1186
ntohs(((struct sockaddr_in *)from)->sin_port));
sys/netinet/sctp_pcb.c
1630
ntohs(((struct sockaddr_in *)addr)->sin_port));
sys/netinet/sctp_pcb.c
1714
if (ntohs(lport) < IPPORT_RESERVED)
sys/netinet/sctp_pcb.c
1923
printf("Main hash to bind at head:%p, bound port:%d\n", head, ntohs(lport));
sys/netinet/sctp_pcb.c
2652
ntohs(((struct sockaddr_in *)firstaddr)->sin_port));
sys/netinet/sctp_pcb.c
4012
ptype = ntohs(phdr->param_type);
sys/netinet/sctp_pcb.c
4013
plen = ntohs(phdr->param_length);
sys/netinet/sctp_pcb.c
4187
lptype = ntohs(fee->addrp.ph.param_type);
sys/netinet/sctp_pcb.c
421
ptype = (int)((u_int)ntohs(phdr->param_type));
sys/netinet/sctp_pcb.c
426
if (ntohs(phdr->param_length) != sizeof(struct sctp_ipv6addr_param)) {
sys/netinet/sctp_pcb.c
449
if (ntohs(phdr->param_length) != sizeof(struct sctp_ipv4addr_param)) {
sys/netinet/sctp_pcb.c
726
printf("Ok, there is NO bound-all available for port:%x\n", ntohs(lport));
sys/netinet/sctp_pcb.c
837
ntohs(((struct sockaddr_in *)nam)->sin_port));
sys/netinet/sctp_pcb.c
999
ptype = ntohs(phdr->param_type);
sys/netinet/sctp_timer.c
976
if (strreq->sr_req.ph.param_type == ntohs(SCTP_STR_RESET_REQUEST)) {
sys/netinet/sctp_usrreq.c
273
nxtsz = ntohs(icmph->icmp_seq);
sys/netinet/sctp_usrreq.c
3310
printf("Port %d\n", ntohs(((struct sockaddr_in *)nam)->sin_port));
sys/netinet/sctputil.c
2722
chk_length = ntohs(ch->chunk_length);
sys/netinet/sctputil.c
2769
chk_length = ntohs(ch->chunk_length);
sys/netinet/sctputil.c
2896
IN6_PRINT(ip6buf, &sin6->sin6_addr), ntohs(sin6->sin6_port),
sys/netinet/sctputil.c
2902
ntohs(sin->sin_port));
sys/netinet/tcp_debug.c
178
len = ntohs((u_int16_t)len);
sys/netinet/tcp_input.c
1283
len = ntohs(ip->ip_len);
sys/netinet/tcp_input.c
3123
oi->maxseg = ntohs(mss);
sys/netinet/tcp_input.c
847
dst, ntohs(th->th_dport),
sys/netinet/tcp_input.c
848
src, ntohs(th->th_sport));
sys/netinet/tcp_input.c
867
dst, ntohs(th->th_dport),
sys/netinet/tcp_input.c
868
src, ntohs(th->th_sport));
sys/netinet/tcp_subr.c
1454
mtu = (u_int)ntohs(icp->icmp_nextmtu);
sys/netinet/tcp_vtw.h
322
return (ntohl(faddr) + ntohs(fport)
sys/netinet/tcp_vtw.h
323
+ ntohl(laddr) + ntohs(lport));
sys/netinet/udp_usrreq.c
1315
ip->ip_len = htons(ntohs(ip->ip_len) - skip);
sys/netinet/udp_usrreq.c
357
ip_len = ntohs(ip->ip_len);
sys/netinet/udp_usrreq.c
358
len = ntohs((u_int16_t)uh->uh_ulen);
sys/netinet6/frag6.c
209
frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset
sys/netinet6/frag6.c
235
fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK);
sys/netinet6/icmp6.c
1272
qtype = ntohs(ni6->ni_qtype);
sys/netinet6/icmp6.c
2715
in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen));
sys/netinet6/in6.c
897
ntohs(mltaddr.sin6_addr.s6_addr16[0]),
sys/netinet6/in6.c
898
ntohs(mltaddr.sin6_addr.s6_addr16[1]),
sys/netinet6/in6.c
996
ntohs(mltaddr.sin6_addr.s6_addr16[0]),
sys/netinet6/in6.c
997
ntohs(mltaddr.sin6_addr.s6_addr16[1]),
sys/netinet6/in6_offload.c
212
plen = ntohs(plen);
sys/netinet6/in6_pcb.c
113
&(table)->inpt_porthashtbl[ntohs(lport) & (table)->inpt_porthash]
sys/netinet6/in6_pcb.c
117
(laddr)->s6_addr32[2] ^ (laddr)->s6_addr32[3]) + ntohs(lport)) & \
sys/netinet6/in6_pcb.c
122
(faddr)->s6_addr32[2] ^ (faddr)->s6_addr32[3]) + ntohs(fport)) + \
sys/netinet6/in6_pcb.c
125
ntohs(lport))) & (table)->inpt_bindhash]
sys/netinet6/in6_pcb.c
249
if (ntohs(sin6->sin6_port) < IPV6PORT_RESERVED)
sys/netinet6/in6_print.c
131
return snprintf(buf, len, "[%s]:%hu", abuf, ntohs(sin6->sin6_port));
sys/netinet6/ip6_input.c
561
plen = (u_int32_t)ntohs(ip6->ip6_plen);
sys/netinet6/ip6_input.c
939
*rtalertp = ntohs(rtalert_val);
sys/netinet6/ip6_mroute.c
1853
ntohs(eip6->ip6_plen));
sys/netinet6/mld6.c
447
timer = ntohs(mldh->mld_maxdelay);
sys/netinet6/scope6.c
254
zoneid = ntohs(sin6->sin6_addr.s6_addr16[1]);
sys/netinet6/sctp6_usrreq.c
274
length = ntohs(ip6->ip6_plen) + iphlen;
sys/netinet6/udp6_usrreq.c
1483
ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) - skip);
sys/netinet6/udp6_usrreq.c
679
ulen = ntohs((u_short)uh->uh_ulen);
sys/netipsec/ipsec.c
1063
sin6->sin6_scope_id = ntohs(ip6->ip6_src.s6_addr16[1]);
sys/netipsec/ipsec.c
1074
sin6->sin6_scope_id = ntohs(ip6->ip6_dst.s6_addr16[1]);
sys/netipsec/ipsec_input.c
138
plen = ntohs(ip->ip_len) - poff;
sys/netipsec/ipsec_input.c
200
return htonl(ntohs(cpi));
sys/netipsec/ipsec_input.c
311
ntohs(sport),
sys/netipsec/ipsec_input.c
313
ntohs(dport),
sys/netipsec/ipsec_input.c
329
(u_long) ntohl(spi), sproto, ntohs(dport), ntohs(sport));
sys/netipsec/ipsec_output.c
343
ntohs(ip6->ip6_src.s6_addr16[1]);
sys/netipsec/ipsec_output.c
356
ntohs(ip6->ip6_dst.s6_addr16[1]);
sys/netipsec/ipsec_output.c
527
if (ntohs(ip->ip_len) <= sav->esp_frag)
sys/netipsec/ipsec_output.c
549
setdf = ntohs(setdf);
sys/netipsec/ipsecif.c
215
if (ntohs(ip->ip_len) <= mtu)
sys/netipsec/ipsecif.c
352
__func__, ntohs(src_port), ntohs(dst_port),
sys/netipsec/ipsecif.c
353
ntohs(var->iv_sport), ntohs(var->iv_dport));
sys/netipsec/ipsecif.c
495
__func__, ntohs(src_port), ntohs(dst_port),
sys/netipsec/ipsecif.c
496
ntohs(var->iv_sport), ntohs(var->iv_dport));
sys/netipsec/key.c
4808
"port fail %d != %d\n", ntohs(port1), ntohs(port2));
sys/netipsec/key.c
4860
ntohs(sin1->sin_port),
sys/netipsec/key.c
4862
ntohs(sin2->sin_port));
sys/netipsec/key.c
5652
ntohs(sport->sadb_x_nat_t_port_port),
sys/netipsec/key.c
5653
ntohs(dport->sadb_x_nat_t_port_port));
sys/netipsec/key.c
5703
ntohs(sport->sadb_x_nat_t_port_port),
sys/netipsec/key.c
5704
ntohs(dport->sadb_x_nat_t_port_port));
sys/netipsec/key_debug.c
648
printf(" port=%u", ntohs(sin4->sin_port));
sys/netipsec/key_debug.c
654
printf(" port=%u", ntohs(sin6->sin6_port));
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/netmpls/mpls_ttl.c
215
icmplen = uimin(ICMP_EXT_OFFSET, ntohs(oip->ip_len));
sys/netmpls/mpls_ttl.c
349
len = ntohs(iph->ip_len);
sys/nfs/nfs_bootdhcp.c
791
myinterfacemtu = ntohs(myinterfacemtu);
sys/nfs/nfs_srvsubs.c
326
ntohs(saddr->sin_port) >= IPPORT_RESERVED) {
sys/nfs/nfs_srvsubs.c
331
ntohs(saddr->sin_port) >= IPV6PORT_RESERVED) {
sys/sys/endian.h
133
#define NTOHS(x) (x) = ntohs(__CAST(uint16_t, (x)))
sys/sys/endian.h
73
uint16_t ntohs(uint16_t) __constfunc;
tests/kernel/t_kauth_pr_47598.c
140
printf("port is %d\n", ntohs(sa.sin_port));
tests/lib/libc/net/h_servent.c
43
svp->s_name, ntohs((uint16_t)svp->s_port), svp->s_proto);
tests/lib/libc/sys/t_connect.c
92
ATF_REQUIRE(ntohs(sin.sin_port) <= IPPORT_RESERVEDMAX);
tests/lib/libutil/t_sockaddr_snprintf.c
70
sin4->sin_port = ntohs(80);
tests/lib/libutil/t_sockaddr_snprintf.c
81
sin6->sin6_port = ntohs(80);
tests/lib/libutil/t_sockaddr_snprintf.c
92
sat->sat_addr.s_net = ntohs(101);
tests/net/net/t_ip_reass.c
147
len = sizeof(packet->family) + ntohs(packet->hdr.ip_len);
tests/net/net/t_ip_reass.c
96
cksum += ntohs(*cksump);
tests/net/net/t_pktinfo_send.c
476
sum += ntohs(*(uint8_t *)p * 256);
tests/net/net/t_pktinfo_send.c
669
inet_ntoa(from.sin_addr), ntohs(from.sin_port));
tests/net/net/t_pktinfo_send.c
765
ntohs(from.sin_port));
tests/rump/rumpkern/h_client/h_stresscli.c
80
ntohs(sin.sin_port));
usr.bin/fstat/fstat.c
1029
ntohs(at->s_net), at->s_node, sat->sat_port);
usr.bin/fstat/fstat.c
1042
ntohs(nr->nr_firstnet), ntohs(nr->nr_lastnet));
usr.bin/fstat/fstat.c
1137
ntohs(inp->inp_lport), isdgram);
usr.bin/fstat/fstat.c
1139
ntohs(inp->inp_fport), isdgram);
usr.bin/fstat/fstat.c
1162
ntohs(inp->inp_lport), isdgram);
usr.bin/fstat/fstat.c
1164
ntohs(inp->inp_fport), isdgram);
usr.bin/getent/getent.c
786
se->s_name, ntohs(se->s_port), se->s_proto)
usr.bin/nc/netcat.c
1464
return ntohs(entry->s_port);
usr.bin/nc/netcat.c
748
ntohs(atoi(portlist[i])),
usr.bin/nc/socks.c
343
host, ntohs(serverport));
usr.bin/nc/socks.c
347
host, ntohs(serverport));
usr.bin/netstat/atalk.c
136
ntohs(sat->sat_range.r_netrange.nr_firstnet),
usr.bin/netstat/atalk.c
137
ntohs(sat->sat_range.r_netrange.nr_lastnet));
usr.bin/netstat/atalk.c
140
ntohs(sat->sat_range.r_netrange.nr_firstnet));
usr.bin/netstat/atalk.c
89
ntohs(sat->sat_addr.s_net));
usr.bin/netstat/inet.c
208
buf[0], ntohs(v4->lport),
usr.bin/netstat/inet.c
209
buf[1], ntohs(v4->fport));
usr.bin/netstat/inet.c
216
buf[0], ntohs(v4->lport),
usr.bin/netstat/inet.c
217
buf[1], ntohs(v4->fport));
usr.bin/netstat/inet.c
221
buf[0], ntohs(v4->lport),
usr.bin/netstat/inet.c
222
buf[1], ntohs(v4->fport),
usr.bin/netstat/inet.c
977
(void)snprintf(cp, space, "%u", ntohs(port));
usr.bin/netstat/inet6.c
1422
"%d", ntohs((u_short)port));
usr.bin/netstat/inet6.c
261
buf[0], ntohs(v6->lport),
usr.bin/netstat/inet6.c
262
buf[1], ntohs(v6->fport));
usr.bin/netstat/inet6.c
269
buf[0], ntohs(v6->lport),
usr.bin/netstat/inet6.c
270
buf[1], ntohs(v6->fport));
usr.bin/netstat/inet6.c
274
buf[0], ntohs(v6->lport),
usr.bin/netstat/inet6.c
275
buf[1], ntohs(v6->fport),
usr.bin/rdist/docmd.c
260
printf("port = %d, luser = %s, ruser = %s\n", ntohs(port), user, ruser);
usr.bin/rpcinfo/rpcinfo.c
1581
portnum = ntohs(getport(&nb));
usr.bin/rump_dhcpclient/dhcp.c
318
*i = ntohs(d);
usr.bin/rump_dhcpclient/net.c
453
return ntohs(packet.ip.ip_len) -
usr.bin/rump_dhcpclient/net.c
482
bytes = ntohs(packet.ip.ip_len);
usr.bin/sockstat/sockstat.c
243
bit_set(portmap, ntohs(srv->s_port));
usr.bin/sockstat/sockstat.c
433
ntohs(satosin(&kp->ki_src)->sin_port) != 0))
usr.bin/sockstat/sockstat.c
440
ntohs(satosin6(&kp->ki_src)->sin6_port) != 0))
usr.bin/sockstat/sockstat.c
504
ntohs(satosin(&kp->ki_src)->sin_port)) &&
usr.bin/sockstat/sockstat.c
506
ntohs(satosin(&kp->ki_dst)->sin_port)))
usr.bin/sockstat/sockstat.c
512
ntohs(satosin6(&kp->ki_src)->sin6_port)) &&
usr.bin/sockstat/sockstat.c
514
ntohs(satosin6(&kp->ki_dst)->sin6_port)))
usr.bin/sockstat/sockstat.c
672
else if (ntohs(si->sin_port) != 0)
usr.bin/sockstat/sockstat.c
683
else if (ntohs(si6->sin6_port) != 0)
usr.bin/systat/netstat.c
548
ntohs((u_short)port));
usr.bin/systat/netstat.c
573
ntohs((u_short)port));
usr.bin/talk/ctl_transact.c
107
rp->addr.sa_family = ntohs(rp->addr.sa_family);
usr.bin/tftp/tftp.c
311
ap->th_opcode = ntohs(ap->th_opcode);
usr.bin/tftp/tftp.c
314
ntohs(ap->th_code), ap->th_msg);
usr.bin/tftp/tftp.c
318
ap->th_block = ntohs(ap->th_block);
usr.bin/tftp/tftp.c
456
dp->th_opcode = ntohs(dp->th_opcode);
usr.bin/tftp/tftp.c
459
ntohs(dp->th_code), dp->th_msg);
usr.bin/tftp/tftp.c
463
dp->th_block = ntohs(dp->th_block);
usr.bin/tftp/tftp.c
639
u_short op = ntohs(tp->th_opcode);
usr.bin/tftp/tftp.c
679
(void)printf("<block=%d, %d bytes>\n", ntohs(tp->th_block),
usr.bin/tftp/tftp.c
684
(void)printf("<block=%d>\n", ntohs(tp->th_block));
usr.bin/tftp/tftp.c
688
(void)printf("<code=%d, msg=%s>\n", ntohs(tp->th_code),
usr.sbin/altq/libaltq/altq_qop.h
236
#define ntoh16(x) ((u_int16_t)ntohs((u_int16_t)(x)))
usr.sbin/altq/libaltq/qop.c
1267
srcport = ntohs(back->ff_flow.fi_sport);
usr.sbin/altq/libaltq/qop.c
1268
dstport = ntohs(front->ff_flow.fi_dport);
usr.sbin/altq/libaltq/qop.c
1276
dstport = ntohs(back->ff_flow.fi_dport);
usr.sbin/altq/libaltq/qop.c
1277
srcport = ntohs(front->ff_flow.fi_sport);
usr.sbin/altq/libaltq/qop.c
1327
srcport = ntohs(back6->ff_flow6.fi6_sport);
usr.sbin/altq/libaltq/qop.c
1328
dstport = ntohs(front6->ff_flow6.fi6_dport);
usr.sbin/altq/libaltq/qop.c
1336
dstport = ntohs(back6->ff_flow6.fi6_dport);
usr.sbin/altq/libaltq/qop.c
1337
srcport = ntohs(front6->ff_flow6.fi6_sport);
usr.sbin/bootp/bootpd/bootpd.c
1260
msgsz = ntohs(msgsz);
usr.sbin/bootp/bootpd/bootpd.c
230
bootps_port = ntohs(bind_addr.sin_port);
usr.sbin/bootp/bootpd/bootpd.c
432
bootps_port = ntohs((u_short) servp->s_port);
usr.sbin/bootp/bootpd/bootpd.c
459
bootpc_port = ntohs(servp->s_port);
usr.sbin/bootp/bootpd/bootpd.c
716
u_int32 t = (u_int32) ntohs(bp->bp_secs);
usr.sbin/bootp/bootpgw/bootpgw.c
193
bootps_port = ntohs(bind_addr.sin_port);
usr.sbin/bootp/bootpgw/bootpgw.c
385
bootps_port = ntohs((u_short) servp->s_port);
usr.sbin/bootp/bootpgw/bootpgw.c
411
bootpc_port = ntohs(servp->s_port);
usr.sbin/bootp/bootpgw/bootpgw.c
513
secs = ntohs(bp->bp_secs);
usr.sbin/bootp/bootpgw/bootpgw.c
518
hops = ntohs(bp->bp_hops);
usr.sbin/bootp/bootptest/bootptest.c
239
bootps_port = ntohs((u_short) sep->s_port);
usr.sbin/bootp/bootptest/bootptest.c
272
bootpc_port = ntohs(sep->s_port);
usr.sbin/bootp/bootptest/print-bootp.c
124
printf(" secs:%d", ntohs(bp->bp_secs));
usr.sbin/bootp/bootptest/print-bootp.c
324
printf("%d", ntohs(us));
usr.sbin/faithd/faithd.c
514
hport = ntohs(((struct sockaddr_in6 *)(void *)&dstaddr4)->sin6_port);
usr.sbin/faithd/faithd.c
516
hport = ntohs(((struct sockaddr_in *)(void *)&dstaddr4)->sin_port);
usr.sbin/faithd/ftp.c
568
ntohs(sin6->sin6_port));
usr.sbin/fwctl/fwdv.c
187
fprintf(stderr, "0x%04x\n", ntohs(ciph->fdf.dv.cyc));
usr.sbin/inetd/inetd.c
1625
port = ntohs(sin->sin_port);
usr.sbin/inetd/inetd.c
1642
port = ntohs(sin6->sin6_port);
usr.sbin/inetd/inetd.c
562
ntohs(sep->se_ctrladdr_in.sin_port));
usr.sbin/ldpd/fsm.c
121
hi->keepalive = ntohs(ht->ch.holdtime);
usr.sbin/ldpd/fsm.c
123
if (ntohs(ht->ch.res) >> 15 == 0)
usr.sbin/ldpd/fsm.c
141
ntohs(ht->ch.holdtime), 0);
usr.sbin/ldpd/fsm.c
74
" Hold time: %d\n", ntohs(ht->ch.type), ntohs(ht->ch.length),
usr.sbin/ldpd/fsm.c
94
ntohs(trtlv->type));
usr.sbin/ldpd/ldp_command.c
452
ntohs(ssin.sin_port));
usr.sbin/ldpd/ldp_command.c
459
inet_ntoa(ssin.sin_addr), ntohs(ssin.sin_port));
usr.sbin/ldpd/ldp_peer.c
321
if ((ntohs(a->type) != TLV_ADDRESS_LIST) ||
usr.sbin/ldpd/ldp_peer.c
322
(ntohs(a->length) < sizeof(a->af) + sizeof(struct in_addr)) ||
usr.sbin/ldpd/ldp_peer.c
323
(ntohs(a->af) != LDP_AF_INET))
usr.sbin/ldpd/ldp_peer.c
327
n = (ntohs(a->length) - sizeof(a->af)) / sizeof(struct in_addr);
usr.sbin/ldpd/ldp_peer.c
359
if (ntohs(a->type) != TLV_ADDRESS_LIST ||
usr.sbin/ldpd/ldp_peer.c
360
ntohs(a->length) > sizeof(a->af) + sizeof(struct in_addr) ||
usr.sbin/ldpd/ldp_peer.c
361
ntohs(a->af) != LDP_AF_INET)
usr.sbin/ldpd/ldp_peer.c
364
n = (ntohs(a->length) - sizeof(a->af)) / sizeof(struct in_addr);
usr.sbin/ldpd/pdu.c
50
p->version = ntohs(p1->version);
usr.sbin/ldpd/pdu.c
51
p->length = ntohs(p1->length);
usr.sbin/ldpd/pdu.c
53
p->label_space = ntohs(p1->label_space);
usr.sbin/ldpd/pdu.c
80
if (ntohs(rpdu->version) != LDP_VERSION) {
usr.sbin/ldpd/pdu.c
82
satos(p->address), ntohs(rpdu->version));
usr.sbin/ldpd/pdu.c
90
if (ntohs(rpdu->length) > c - PDU_VER_LENGTH) {
usr.sbin/ldpd/pdu.c
93
ntohs(rpdu->length), (int) (c - PDU_VER_LENGTH));
usr.sbin/ldpd/socketops.c
1139
ntohs(rpdu->length) + PDU_VER_LENGTH, MSG_WAITALL);
usr.sbin/ldpd/socketops.c
1146
debugp("Read %d bytes, PDU size: %d bytes\n", c, ntohs(rpdu->length));
usr.sbin/ldpd/socketops.c
1153
if ((ntohs(ttmp->type) != LDP_KEEPALIVE) &&
usr.sbin/ldpd/socketops.c
1154
(ntohs(ttmp->type) != LDP_LABEL_MAPPING)) {
usr.sbin/ldpd/socketops.c
1156
ntohs(ttmp->type), ntohs(ttmp->length),
usr.sbin/ldpd/socketops.c
1160
ntohs(ttmp->type), ntohs(ttmp->length),
usr.sbin/ldpd/socketops.c
1165
ntohs(ttmp->type) != LDP_INITIALIZE &&
usr.sbin/ldpd/socketops.c
1166
ntohs(ttmp->type) != LDP_KEEPALIVE &&
usr.sbin/ldpd/socketops.c
1167
ntohs(ttmp->type) != LDP_NOTIFICATION)
usr.sbin/ldpd/socketops.c
1170
switch (ntohs(ttmp->type)) {
usr.sbin/ldpd/socketops.c
1174
if (ntohs(itlv->length) <
usr.sbin/ldpd/socketops.c
1183
if (ntohs(itlv->cs_version) != LDP_VERSION) {
usr.sbin/ldpd/socketops.c
1256
+ ntohs(fectlv->length) + TLV_TYPE_LENGTH);
usr.sbin/ldpd/socketops.c
1332
wo += ntohs(ttmp->length) + TLV_TYPE_LENGTH;
usr.sbin/ldpd/socketops.c
1356
if (ntohs(pdu->length) !=
usr.sbin/ldpd/socketops.c
1357
ntohs(t->length) + TLV_TYPE_LENGTH + PDU_PAYLOAD_LENGTH) {
usr.sbin/ldpd/socketops.c
1359
fatalp("LDP: TLV len %d - PDU len %d\n", ntohs(t->length),
usr.sbin/ldpd/socketops.c
1360
ntohs(pdu->length));
usr.sbin/ldpd/socketops.c
1363
if (ntohs(t->length) + PDU_VER_LENGTH > MAX_PDU_SIZE) {
usr.sbin/ldpd/socketops.c
1370
ntohs(t->length) + TLV_TYPE_LENGTH);
usr.sbin/ldpd/socketops.c
1373
if ((ntohs(t->type) != 0x201) && (ntohs(t->type) != 0x400)) {
usr.sbin/ldpd/socketops.c
1375
ntohs(t->type), inet_ntoa(p->ldp_id), ntohs(t->length));
usr.sbin/ldpd/socketops.c
1379
ntohs(t->type), inet_ntoa(p->ldp_id), ntohs(t->length));
usr.sbin/ldpd/socketops.c
1383
ntohs(pdu->length) + PDU_VER_LENGTH, 0);
usr.sbin/ldpd/socketops.c
1400
pdu.length = htons(ntohs(t->length) + TLV_TYPE_LENGTH +
usr.sbin/ldpd/socketops.c
542
ntohs(spdu->length), ntohs(t->length),
usr.sbin/ldpd/socketops.c
543
ntohs(cht->length), ntohs(trtlv->length));
usr.sbin/ldpd/tlv.c
55
if (ntohs(t->type) != LDP_HELLO)
usr.sbin/ldpd/tlv.c
59
if (ntohs(t->length) + TLV_TYPE_LENGTH > max)
usr.sbin/ldpd/tlv.c
62
t->type = ntohs(t->type);
usr.sbin/ldpd/tlv.c
63
t->length = ntohs(t->length);
usr.sbin/ldpd/tlv.c
73
warnp("TLV type %.4X, Length %d, Message ID %.8X\n", ntohs(t->type),
usr.sbin/ldpd/tlv.c
74
ntohs(t->length), ntohs(t->messageid));
usr.sbin/ldpd/tlv_stack.c
101
if (ntohs(pref->af) == LDP_AF_INET) {
usr.sbin/ldpd/tlv_stack.c
104
} else if (ntohs(pref->af) == LDP_AF_INET6) {
usr.sbin/ldpd/tlv_stack.c
109
"length %d)\n", ntohs(pref->af), pref->type,
usr.sbin/ldpd/tlv_stack.c
162
if (ntohs(f->type) != TLV_FEC) {
usr.sbin/ldpd/tlv_stack.c
166
n = ntohs(f->length);
usr.sbin/ldpd/tlv_stack.c
173
if (ntohs(pref->af) == LDP_AF_INET) {
usr.sbin/ldpd/tlv_stack.c
176
} else if (ntohs(pref->af) != LDP_AF_INET6) {
usr.sbin/ldpd/tlv_stack.c
181
ntohs(pref->af), pref->type, pref->prelen);
usr.sbin/ldpd/tlv_stack.c
311
memcpy(((char*)l) + TLV_TYPE_LENGTH + ntohs(l->length),
usr.sbin/ldpd/tlv_stack.c
417
if (ntohs(fec->type) != TLV_FEC || fec->length == 0) {
usr.sbin/ldpd/tlv_stack.c
424
if (ntohs(pref->af) == LDP_AF_INET) {
usr.sbin/ldpd/tlv_stack.c
427
} else if (ntohs(pref->af) == LDP_AF_INET6) {
usr.sbin/ldpd/tlv_stack.c
68
if (ntohs(f->type) != TLV_FEC) {
usr.sbin/ldpd/tlv_stack.c
72
if (ntohs(l->type) != TLV_GENERIC_LABEL) {
usr.sbin/ldpd/tlv_stack.c
73
debugp("Invalid LABEL TLV! (0x%.4X)\n", ntohs(l->type));
usr.sbin/ldpd/tlv_stack.c
81
n = ntohs(f->length);
usr.sbin/mopd/common/get.c
92
if (ntohs(*ptype) < 1600) {
usr.sbin/mountd/mountd.c
2185
sport = ntohs(((struct sockaddr_in6 *)saddr)->sin6_port);
usr.sbin/mountd/mountd.c
2188
sport = ntohs(((struct sockaddr_in *)saddr)->sin_port);
usr.sbin/mountd/mountd.c
597
sport = ntohs(sin6->sin6_port);
usr.sbin/mountd/mountd.c
601
sport = ntohs(sin->sin_port);
usr.sbin/npf/npfctl/npf_bpf_comp.c
494
type = ntohs(type);
usr.sbin/npf/npfctl/npf_bpf_comp.c
704
mac_hword = ntohs(mac_hword);
usr.sbin/npf/npfctl/npf_bpf_comp.c
760
from = ntohs(from);
usr.sbin/npf/npfctl/npf_bpf_comp.c
761
to = ntohs(to);
usr.sbin/npf/npfctl/npf_data.c
511
return ntohs(p);
usr.sbin/npf/npfctl/npf_show.c
737
easprintf(&p, "%s port %u", seg, ntohs(port));
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_nat_test.c
197
printf("src %s (%d) ", sbuf, ntohs(uh->uh_sport));
usr.sbin/npf/npftest/libnpftest/npf_nat_test.c
198
printf("dst %s (%d)\n", dbuf, ntohs(uh->uh_dport));
usr.sbin/npf/npftest/libnpftest/npf_nat_test.c
211
CHECK_TRUE(sport == ntohs(uh->uh_sport));
usr.sbin/npf/npftest/libnpftest/npf_nat_test.c
213
CHECK_TRUE(dport == ntohs(uh->uh_dport));
usr.sbin/npf/npftest/npfstream.c
49
if (ntohs(eth->ether_type) != ETHERTYPE_IP) {
usr.sbin/npf/npftest/npfstream.c
59
tcpdlen = ntohs(ip->ip_len) - hlen - (th->th_off << 2);
usr.sbin/npf/npftest/npfstream.c
78
len = ntohs(ip->ip_len);
usr.sbin/npf/npftest/npfstream.c
84
tcpdlen, ntohs(th->th_win), (uintptr_t)result[0]);
usr.sbin/pf/pfs/pfs.c
235
port = ntohs(h->port);
usr.sbin/rarpd/rarpd.c
391
if (ntohs (ep->ether_type) != ETHERTYPE_REVARP ||
usr.sbin/rarpd/rarpd.c
394
ntohs (ap->ar_hrd) != ARPHRD_ETHER ||
usr.sbin/rarpd/rarpd.c
395
ntohs (ap->ar_op) != ARPOP_REVREQUEST ||
usr.sbin/rarpd/rarpd.c
396
ntohs (ap->ar_pro) != ETHERTYPE_IP ||
usr.sbin/rarpd/rarpd.c
399
ntohs (ap->arp_hrd) != ARPHRD_ETHER ||
usr.sbin/rarpd/rarpd.c
400
ntohs (ap->arp_op) != ARPOP_REVREQUEST ||
usr.sbin/rarpd/rarpd.c
401
ntohs (ap->arp_pro) != ETHERTYPE_IP ||
usr.sbin/rbootd/rmp_var.h
161
(i) = (((u_int32_t)ntohs((w).val[_WORD_HIGHPART])) << 16) | ntohs((w).val[_WORD_LOWPART])
usr.sbin/rbootd/rmpproto.c
115
if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) {
usr.sbin/rbootd/rmpproto.c
434
if (ntohs(req->r_rrq.rmp_session) !=
usr.sbin/rbootd/rmpproto.c
435
((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session):
usr.sbin/rbootd/rmpproto.c
436
ntohs(rpl->r_rrpl.rmp_session))) {
usr.sbin/rbootd/rmpproto.c
452
if (ntohs(req->r_rrq.rmp_size) > RMPREADDATA)
usr.sbin/rbootd/rmpproto.c
471
(int) ntohs(req->r_rrq.rmp_size))) <= 0) {
usr.sbin/rbootd/rmpproto.c
538
if (ntohs(rconn->rmp.r_rrq.rmp_session) !=
usr.sbin/rbootd/rmpproto.c
539
((rpl->r_type == RMP_BOOT_REPL)? ntohs(rpl->r_brpl.rmp_session):
usr.sbin/rbootd/rmpproto.c
540
ntohs(rpl->r_rrpl.rmp_session))) {
usr.sbin/rbootd/utils.c
117
rmp->hp_llc.dsap, rmp->hp_llc.ssap, ntohs(rmp->hp_llc.cntrl));
usr.sbin/rbootd/utils.c
121
ntohs(rmp->hp_llc.dxsap), ntohs(rmp->hp_llc.sxsap));
usr.sbin/rbootd/utils.c
131
if (ntohs(rmp->r_brq.rmp_session) == RMP_PROBESID) {
usr.sbin/rbootd/utils.c
139
(unsigned long)t, ntohs(rmp->r_brq.rmp_session),
usr.sbin/rbootd/utils.c
140
ntohs(rmp->r_brq.rmp_version));
usr.sbin/rbootd/utils.c
150
(unsigned long)t, ntohs(rmp->r_brpl.rmp_session),
usr.sbin/rbootd/utils.c
151
ntohs(rmp->r_brpl.rmp_version));
usr.sbin/rbootd/utils.c
158
(unsigned long)t, ntohs(rmp->r_rrq.rmp_session));
usr.sbin/rbootd/utils.c
160
ntohs(rmp->r_rrq.rmp_size));
usr.sbin/rbootd/utils.c
166
(unsigned long)t, ntohs(rmp->r_rrpl.rmp_session));
usr.sbin/rbootd/utils.c
174
ntohs(rmp->r_done.rmp_session));
usr.sbin/rip6query/rip6query.c
172
printf(" tag=0x%x", ntohs(np->rip6_tag));
usr.sbin/route6d/route6d.c
1063
ifcp->ifc_name, inet6_n2p(&nh), ntohs(fsock.sin6_port), (int)nn);
usr.sbin/route6d/route6d.c
1113
trace(2, " tag=0x%04x", ntohs(np->rip6_tag) & 0xffff);
usr.sbin/route6d/route6d.c
2826
ntohs(rrt->rrt_info.rip6_tag) & 0xffff);
usr.sbin/route6d/route6d.c
643
inet6_n2p(&sin6->sin6_addr), ntohs(sin6->sin6_port));
usr.sbin/route6d/route6d.c
646
nrt, inet6_n2p(&sin6->sin6_addr), ntohs(sin6->sin6_port));
usr.sbin/route6d/route6d.c
664
ntohs(nip->rip6_tag) & 0xffff);
usr.sbin/rpcbind/security.c
155
(ntohs(sin->sin_port) < IPPORT_RESERVED));
usr.sbin/rpcbind/security.c
162
(ntohs(sin6->sin6_port) < IPV6PORT_RESERVED));
usr.sbin/rwhod/rwhod.c
279
ntohs(from.sin_port));
usr.sbin/rwhod/rwhod.c
561
ntohs(sasin->sin_port));
usr.sbin/timed/timed/byteorder.c
67
ptr->tsp_seq = ntohs((uint16_t)ptr->tsp_seq);
usr.sbin/traceroute/traceroute.c
1147
if (ntohs(cmn_hdr->checksum) &&
usr.sbin/traceroute/traceroute.c
1158
obj_len = ntohs(obj_hdr->length);
usr.sbin/traceroute/traceroute.c
1200
buf += ntohs(obj_hdr->length) -
usr.sbin/traceroute/traceroute.c
1210
buf += ntohs(obj_hdr->length) -
usr.sbin/traceroute/traceroute.c
1319
Printf(" %04x", ntohs(*sp++));
usr.sbin/traceroute/traceroute.c
1440
pmtu = ntohs(icp->icmp_nextmtu);
usr.sbin/traceroute/traceroute.c
1442
pmtu = ntohs(((struct my_pmtu *)&icp->icmp_void)->ipm_nextmtu);
usr.sbin/traceroute/traceroute.c
1454
nextmtu = ntohs(icp->icmp_nextmtu); /* for frag_err() */
usr.sbin/traceroute6/traceroute6.c
646
srcport = ntohs(Src.sin6_port);
usr.sbin/trpt/trpt.c
440
hbuf, ntohs(th->th_sport));
usr.sbin/trpt/trpt.c
450
hbuf, ntohs(th->th_dport));
usr.sbin/ypbind/ypbind.c
466
if (!insecure && ntohs(addr->sin_port) >= IPPORT_RESERVED) {
usr.sbin/ypbind/ypbind.c
811
ntohs(dom->dom_server_addr.sin_port));
usr.sbin/ypbind/ypbind.c
857
if (ntohs(fromsin->sin_port) >= IPPORT_RESERVED) {