arch/arc/include/asm/checksum.h
86
"r"(htons(proto))
arch/um/drivers/port_user.c
128
addr.sin_port = htons(port);
arch/um/drivers/vector_user.c
184
sock.sll_protocol = htons(proto);
arch/x86/include/asm/checksum_64.h
181
sum64 = (__force __u64)htonl(len) + (__force __u64)htons(proto) +
drivers/atm/atmtcp.c
129
msg.hdr.vpi = htons(vpi);
drivers/atm/atmtcp.c
131
msg.hdr.vci = htons(vci);
drivers/atm/atmtcp.c
222
hdr->vpi = htons(vcc->vpi);
drivers/atm/atmtcp.c
223
hdr->vci = htons(vcc->vci);
drivers/crypto/chelsio/chcr_algo.c
371
phys_cpl->rss_hdr_int.qid = htons(qid);
drivers/crypto/chelsio/chcr_algo.c
385
walk->to->len[j % 8] = htons(size);
drivers/crypto/chelsio/chcr_algo.c
421
walk->to->len[j % 8] = htons(ent_len);
drivers/firewire/net.c
1265
case htons(ETH_P_ARP):
drivers/firewire/net.c
1266
case htons(ETH_P_IP):
drivers/firewire/net.c
1268
case htons(ETH_P_IPV6):
drivers/firewire/net.c
531
protocol = htons(ETH_P_802_3);
drivers/firewire/net.c
533
protocol = htons(ETH_P_802_2);
drivers/firewire/net.c
991
case htons(ETH_P_IPV6):
drivers/hsi/clients/ssi_protocol.c
633
skb->protocol = htons(ETH_P_PHONET);
drivers/hsi/clients/ssi_protocol.c
976
if ((skb->protocol != htons(ETH_P_PHONET)) ||
drivers/hsi/clients/ssi_protocol.c
991
((u16 *)skb->data)[2] = htons(((u16 *)skb->data)[2]);
drivers/i2c/busses/i2c-cp2615.c
158
if (msg->msg != htons(iop_I2cTransferResult) || i2c_r->tag != tag) {
drivers/i2c/busses/i2c-cp2615.c
192
if (msg->msg != htons(iop_AccessoryInfo)) {
drivers/i2c/busses/i2c-cp2615.c
88
ret->preamble = htons(0x2A2AU);
drivers/i2c/busses/i2c-cp2615.c
89
ret->length = htons(data_len + 6);
drivers/i2c/busses/i2c-cp2615.c
90
ret->msg = htons(msg);
drivers/infiniband/core/cm.c
1399
htons(ntohl(sa_path_get_slid(
drivers/infiniband/core/cm.c
1403
htons(ntohl(sa_path_get_dlid(
drivers/infiniband/core/cm.c
1456
htons(ntohl(sa_path_get_slid(
drivers/infiniband/core/cm.c
1461
htons(ntohl(sa_path_get_dlid(
drivers/infiniband/core/cma.c
1407
return htons((u16) (be64_to_cpu(sib->sib_sid) &
drivers/infiniband/core/cma.c
1517
port = htons(cma_port_from_service_id(service_id));
drivers/infiniband/core/cma.c
3660
port = htons(bind_list->port);
drivers/infiniband/core/lag.c
37
htons(rdma_flow_label_to_udp_sport(ah_attr->grh.flow_label));
drivers/infiniband/core/lag.c
38
uh->dest = htons(ROCE_V2_UDP_DPORT);
drivers/infiniband/core/lag.c
39
uh->len = htons(sizeof(struct udphdr));
drivers/infiniband/core/lag.c
49
iph->tot_len = htons(sizeof(struct udphdr) + sizeof(struct
drivers/infiniband/core/lag.c
72
skb->protocol = eth->h_proto = htons(is_ipv4 ? ETH_P_IP : ETH_P_IPV6);
drivers/infiniband/core/uverbs_marshall.c
142
dst->dlid = htons(ntohl(sa_path_get_dlid(src)));
drivers/infiniband/core/uverbs_marshall.c
143
dst->slid = htons(ntohl(sa_path_get_slid(src)));
drivers/infiniband/hw/bnxt_re/ib_verbs.c
2503
qp->qp1_hdr.ip4.frag_off = htons(IP_DF);
drivers/infiniband/hw/bnxt_re/ib_verbs.c
2512
qp->qp1_hdr.udp.dport = htons(ROCE_V2_UDP_DPORT);
drivers/infiniband/hw/bnxt_re/ib_verbs.c
2513
qp->qp1_hdr.udp.sport = htons(0x8CD1);
drivers/infiniband/hw/bnxt_re/ib_verbs.c
3702
htons(ETH_P_8021Q), vlan_id))
drivers/infiniband/hw/cxgb4/cm.c
1003
mpa_v2_params.ird = htons((u16)ep->ird);
drivers/infiniband/hw/cxgb4/cm.c
1004
mpa_v2_params.ord = htons((u16)ep->ord);
drivers/infiniband/hw/cxgb4/cm.c
1007
mpa_v2_params.ird |= htons(MPA_V2_PEER2PEER_MODEL);
drivers/infiniband/hw/cxgb4/cm.c
1010
htons(MPA_V2_RDMA_WRITE_RTR);
drivers/infiniband/hw/cxgb4/cm.c
1013
htons(MPA_V2_RDMA_READ_RTR);
drivers/infiniband/hw/cxgb4/cm.c
1086
mpa->private_data_size = htons(plen);
drivers/infiniband/hw/cxgb4/cm.c
1091
htons(ntohs(mpa->private_data_size) +
drivers/infiniband/hw/cxgb4/cm.c
1093
mpa_v2_params.ird = htons(((u16)ep->ird) |
drivers/infiniband/hw/cxgb4/cm.c
1096
mpa_v2_params.ord = htons(((u16)ep->ord) | (peer2peer ?
drivers/infiniband/hw/cxgb4/cm.c
1170
mpa->private_data_size = htons(plen);
drivers/infiniband/hw/cxgb4/cm.c
1175
htons(ntohs(mpa->private_data_size) +
drivers/infiniband/hw/cxgb4/cm.c
1177
mpa_v2_params.ird = htons((u16)ep->ird);
drivers/infiniband/hw/cxgb4/cm.c
1178
mpa_v2_params.ord = htons((u16)ep->ord);
drivers/infiniband/hw/cxgb4/cm.c
1181
mpa_v2_params.ird |= htons(MPA_V2_PEER2PEER_MODEL);
drivers/infiniband/hw/cxgb4/cm.c
1185
htons(MPA_V2_RDMA_WRITE_RTR);
drivers/infiniband/hw/cxgb4/cm.c
1188
htons(MPA_V2_RDMA_READ_RTR);
drivers/infiniband/hw/cxgb4/cm.c
1989
htons(FW_OFLD_CONNECTION_WR_CPLRXDATAACK_F);
drivers/infiniband/hw/cxgb4/cm.c
1991
req->tcb.rcv_adv = htons(1);
drivers/infiniband/hw/cxgb4/cm.c
3987
req->tcpopt.mss = htons(tmp_opt.mss_clamp);
drivers/infiniband/hw/cxgb4/cm.c
4021
req->tcb.rcv_adv = htons(window);
drivers/infiniband/hw/cxgb4/cm.c
4126
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(cpl->vlan));
drivers/infiniband/hw/cxgb4/cm.c
4180
window = (__force u16) htons((__force u16)tcph->window);
drivers/infiniband/hw/cxgb4/cm.c
676
req->reply_ctrl = htons(REPLY_CHAN_V(0) | QUEUENO_V(ep->rss_qid));
drivers/infiniband/hw/cxgb4/cm.c
990
mpa->private_data_size = htons(ep->plen);
drivers/infiniband/hw/cxgb4/cm.c
999
htons(ntohs(mpa->private_data_size) +
drivers/infiniband/hw/irdma/cm.c
100
laddr->sin_port = htons(cm_node->loc_port);
drivers/infiniband/hw/irdma/cm.c
101
raddr->sin_port = htons(cm_node->rem_port);
drivers/infiniband/hw/irdma/cm.c
121
laddr6->sin6_port = htons(cm_node->loc_port);
drivers/infiniband/hw/irdma/cm.c
122
raddr6->sin6_port = htons(cm_node->rem_port);
drivers/infiniband/hw/irdma/cm.c
1400
options->mss.mss = htons(cm_node->tcp_cntxt.mss);
drivers/infiniband/hw/irdma/cm.c
2308
htons(cm_node->loc_port),
drivers/infiniband/hw/irdma/cm.c
2309
htons(cm_node->rem_port));
drivers/infiniband/hw/irdma/cm.c
2321
htons(cm_node->loc_port),
drivers/infiniband/hw/irdma/cm.c
2322
htons(cm_node->rem_port));
drivers/infiniband/hw/irdma/cm.c
3170
if (ethh->h_vlan_proto == htons(ETH_P_8021Q)) {
drivers/infiniband/hw/irdma/cm.c
349
tcph->source = htons(cm_node->loc_port);
drivers/infiniband/hw/irdma/cm.c
350
tcph->dest = htons(cm_node->rem_port);
drivers/infiniband/hw/irdma/cm.c
378
tcph->window = htons(cm_node->tcp_cntxt.rcv_wnd);
drivers/infiniband/hw/irdma/cm.c
481
htons(ETH_P_8021Q);
drivers/infiniband/hw/irdma/cm.c
484
((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(vtag);
drivers/infiniband/hw/irdma/cm.c
487
htons(ETH_P_IP);
drivers/infiniband/hw/irdma/cm.c
489
ethh->h_proto = htons(ETH_P_IP);
drivers/infiniband/hw/irdma/cm.c
495
iph->tot_len = htons(pktsize);
drivers/infiniband/hw/irdma/cm.c
496
iph->id = htons(++cm_node->tcp_cntxt.loc_id);
drivers/infiniband/hw/irdma/cm.c
498
iph->frag_off = htons(0x4000);
drivers/infiniband/hw/irdma/cm.c
514
htons(ETH_P_8021Q);
drivers/infiniband/hw/irdma/cm.c
517
((struct vlan_ethhdr *)ethh)->h_vlan_TCI = htons(vtag);
drivers/infiniband/hw/irdma/cm.c
519
htons(ETH_P_IPV6);
drivers/infiniband/hw/irdma/cm.c
521
ethh->h_proto = htons(ETH_P_IPV6);
drivers/infiniband/hw/irdma/cm.c
528
ip6h->payload_len = htons(pktsize - sizeof(*ip6h));
drivers/infiniband/hw/irdma/cm.c
537
tcph->source = htons(cm_node->loc_port);
drivers/infiniband/hw/irdma/cm.c
538
tcph->dest = htons(cm_node->rem_port);
drivers/infiniband/hw/irdma/cm.c
566
tcph->window = htons(cm_node->tcp_cntxt.rcv_wnd);
drivers/infiniband/hw/irdma/cm.c
800
mpa_frame->priv_data_len = htons(cm_node->pdata.size);
drivers/infiniband/hw/irdma/cm.c
858
rtr_msg->ctrl_ird = htons(ctrl_ird);
drivers/infiniband/hw/irdma/cm.c
859
rtr_msg->ctrl_ord = htons(ctrl_ord);
drivers/infiniband/hw/irdma/trace.c
13
trace_seq_printf(p, "%pI4:%d", &myaddr, htons(port));
drivers/infiniband/hw/irdma/trace.c
15
trace_seq_printf(p, "%pI6:%d", addr, htons(port));
drivers/infiniband/hw/irdma/utils.c
1509
iph->tot_len = htons(pktsize);
drivers/infiniband/hw/irdma/utils.c
1550
if (ethh->h_proto == htons(0x8100)) {
drivers/infiniband/hw/mlx4/qp.c
3134
sqp->ud_header.ip4.frag_off = htons(IP_DF);
drivers/infiniband/hw/mlx4/qp.c
3144
sqp->ud_header.udp.dport = htons(ROCE_V2_UDP_DPORT);
drivers/infiniband/hw/mlx4/qp.c
3145
sqp->ud_header.udp.sport = htons(MLX4_ROCEV2_QP1_SPORT);
drivers/infiniband/hw/mlx5/fs.c
601
htons(0xffff));
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
128
*((__be16 *)&ipv4) = htons((4 << 12) | (5 << 8) |
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
131
ipv4.frag_off = htons(IP_DF);
drivers/infiniband/hw/ocrdma/ocrdma_ah.c
132
ipv4.tot_len = htons(0);
drivers/infiniband/hw/qedr/qedr_iw_cm.c
52
laddr->sin_port = htons(cm_info->local_port);
drivers/infiniband/hw/qedr/qedr_iw_cm.c
53
raddr->sin_port = htons(cm_info->remote_port);
drivers/infiniband/hw/qedr/qedr_iw_cm.c
71
laddr6->sin6_port = htons(cm_info->local_port);
drivers/infiniband/hw/qedr/qedr_iw_cm.c
72
raddr6->sin6_port = htons(cm_info->remote_port);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
436
udh->eth.type = htons(ETH_P_8021Q);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
437
udh->vlan.tag = htons(vlan_id);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
438
udh->vlan.type = htons(ether_type);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
440
udh->eth.type = htons(ether_type);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
468
udh->ip4.frag_off = htons(IP_DF);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
480
udh->udp.sport = htons(QEDR_ROCE_V2_UDP_SPORT);
drivers/infiniband/hw/qedr/qedr_roce_cm.c
481
udh->udp.dport = htons(ROCE_V2_UDP_DPORT);
drivers/infiniband/sw/rxe/rxe_icrc.c
44
(skb->protocol == htons(ETH_P_IP) ?
drivers/infiniband/sw/rxe/rxe_icrc.c
58
if (skb->protocol == htons(ETH_P_IP)) { /* IPv4 */
drivers/infiniband/sw/rxe/rxe_net.c
303
udph->len = htons(skb->len);
drivers/infiniband/sw/rxe/rxe_net.c
326
iph->tot_len = htons(skb->len);
drivers/infiniband/sw/rxe/rxe_net.c
352
ip6h->payload_len = htons(skb->len);
drivers/infiniband/sw/rxe/rxe_net.c
357
ip6h->payload_len = htons(skb->len - sizeof(*ip6h));
drivers/infiniband/sw/rxe/rxe_net.c
366
__be16 df = htons(IP_DF);
drivers/infiniband/sw/rxe/rxe_net.c
416
if (skb->protocol == htons(ETH_P_IP))
drivers/infiniband/sw/rxe/rxe_net.c
418
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/infiniband/sw/rxe/rxe_net.c
452
if (skb->protocol == htons(ETH_P_IP))
drivers/infiniband/sw/rxe/rxe_net.c
475
if (skb->protocol == htons(ETH_P_IP))
drivers/infiniband/sw/rxe/rxe_net.c
575
skb->protocol = htons(ETH_P_IP);
drivers/infiniband/sw/rxe/rxe_net.c
577
skb->protocol = htons(ETH_P_IPV6);
drivers/infiniband/sw/rxe/rxe_net.c
715
htons(ROCE_V2_UDP_DPORT), false);
drivers/infiniband/sw/rxe/rxe_net.c
730
htons(ROCE_V2_UDP_DPORT), true);
drivers/infiniband/sw/rxe/rxe_recv.c
111
if (skb->protocol == htons(ETH_P_IP)) {
drivers/infiniband/sw/rxe/rxe_recv.c
121
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/infiniband/sw/rxe/rxe_recv.c
199
if (skb->protocol == htons(ETH_P_IP))
drivers/infiniband/sw/rxe/rxe_recv.c
202
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/infiniband/sw/rxe/rxe_recv.c
294
if (skb->protocol == htons(ETH_P_IP)) {
drivers/infiniband/sw/rxe/rxe_resp.c
1007
if (skb->protocol == htons(ETH_P_IP)) {
drivers/infiniband/sw/rxe/rxe_resp.c
1127
if (skb->protocol == htons(ETH_P_IP))
drivers/infiniband/sw/siw/siw_cm.c
1531
cep->mpa.v2_ctrl.ird = htons(cep->ird);
drivers/infiniband/sw/siw/siw_cm.c
1532
cep->mpa.v2_ctrl.ord = htons(cep->ord);
drivers/infiniband/sw/siw/siw_cm.c
1685
htons(params->ord & MPA_IRD_ORD_MASK) |
drivers/infiniband/sw/siw/siw_cm.c
1688
htons(params->ird & MPA_IRD_ORD_MASK) |
drivers/infiniband/sw/siw/siw_cm.c
721
cep->mpa.v2_ctrl.ird = htons(cep->ird);
drivers/infiniband/sw/siw/siw_cm.c
722
cep->mpa.v2_ctrl.ord = htons(cep->ord);
drivers/infiniband/sw/siw/siw_qp.c
36
.ctrl.mpa_len = htons(sizeof(struct iwarp_rdma_write) - 2),
drivers/infiniband/sw/siw/siw_qp.c
44
.ctrl.mpa_len = htons(sizeof(struct iwarp_rdma_rreq) - 2),
drivers/infiniband/sw/siw/siw_qp.c
51
.ctrl.mpa_len = htons(sizeof(struct iwarp_rdma_rresp) - 2),
drivers/infiniband/sw/siw/siw_qp.c
59
.ctrl.mpa_len = htons(sizeof(struct iwarp_send) - 2),
drivers/infiniband/sw/siw/siw_qp.c
66
.ctrl.mpa_len = htons(sizeof(struct iwarp_send_inv) - 2),
drivers/infiniband/sw/siw/siw_qp.c
73
.ctrl.mpa_len = htons(sizeof(struct iwarp_send) - 2),
drivers/infiniband/sw/siw/siw_qp.c
80
.ctrl.mpa_len = htons(sizeof(struct iwarp_send_inv) - 2),
drivers/infiniband/sw/siw/siw_qp.c
87
.ctrl.mpa_len = htons(sizeof(struct iwarp_terminate) - 2),
drivers/infiniband/sw/siw/siw_qp_tx.c
232
htons(c_tx->ctrl_len + data - MPA_HDR_SIZE);
drivers/infiniband/sw/siw/siw_qp_tx.c
738
htons(c_tx->ctrl_len + data_len - MPA_HDR_SIZE);
drivers/infiniband/ulp/ipoib/ipoib_cm.c
1438
if (skb->protocol == htons(ETH_P_IP)) {
drivers/infiniband/ulp/ipoib/ipoib_cm.c
1443
else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/infiniband/ulp/ipoib/ipoib_main.c
1152
if ((header->proto != htons(ETH_P_IP)) &&
drivers/infiniband/ulp/ipoib/ipoib_main.c
1153
(header->proto != htons(ETH_P_IPV6)) &&
drivers/infiniband/ulp/ipoib/ipoib_main.c
1154
(header->proto != htons(ETH_P_ARP)) &&
drivers/infiniband/ulp/ipoib/ipoib_main.c
1155
(header->proto != htons(ETH_P_RARP)) &&
drivers/infiniband/ulp/ipoib/ipoib_main.c
1156
(header->proto != htons(ETH_P_TIPC))) {
drivers/infiniband/ulp/ipoib/ipoib_main.c
1175
case htons(ETH_P_IP):
drivers/infiniband/ulp/ipoib/ipoib_main.c
1176
case htons(ETH_P_IPV6):
drivers/infiniband/ulp/ipoib/ipoib_main.c
1177
case htons(ETH_P_TIPC):
drivers/infiniband/ulp/ipoib/ipoib_main.c
1185
case htons(ETH_P_ARP):
drivers/infiniband/ulp/ipoib/ipoib_main.c
1186
case htons(ETH_P_RARP):
drivers/infiniband/ulp/ipoib/ipoib_main.c
1287
header->proto = htons(type);
drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c
417
case htons(ETH_P_IPV6):
drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c
428
case htons(ETH_P_IP):
drivers/infiniband/ulp/rtrs/rtrs-srv.c
2117
.sin6_port = htons(port),
drivers/isdn/mISDN/l1oip_core.c
671
hc->sin_local.sin_port = htons((unsigned short)hc->localport);
drivers/isdn/mISDN/l1oip_core.c
676
hc->sin_remote.sin_port = htons((unsigned short)hc->remoteport);
drivers/media/dvb-core/dvb_net.c
158
return htons(ETH_P_802_3);
drivers/media/dvb-core/dvb_net.c
163
return htons(ETH_P_802_2);
drivers/media/dvb-core/dvb_net.c
741
h->ethh->h_proto = htons(h->priv->ule_sndu_type);
drivers/media/dvb-core/dvb_net.c
823
__be16 ulen = htons(h.priv->ule_sndu_len);
drivers/media/dvb-core/dvb_net.c
824
__be16 utype = htons(h.priv->ule_sndu_type);
drivers/media/dvb-core/dvb_net.c
836
ulen |= htons(0x8000);
drivers/media/test-drivers/vicodec/codec-fwht.c
103
*output = htons(ALL_ZEROS | 0);
drivers/media/test-drivers/vicodec/codec-fwht.c
692
__be16 pframe_bit = htons(PFRAME_BIT);
drivers/media/test-drivers/vicodec/codec-fwht.c
740
*last_rlco = htons(hdr + 2);
drivers/media/test-drivers/vicodec/codec-fwht.c
78
*output++ = (blocktype == PBLOCK ? htons(PFRAME_BIT) : 0);
drivers/media/test-drivers/vicodec/codec-fwht.c
98
*output++ = htons((cnt | tmp << 4));
drivers/media/usb/ttusb-dec/ttusb_dec.c
1053
pid = htons(dvbdmxfeed->pid);
drivers/media/usb/ttusb-dec/ttusb_dec.c
1354
firmware_csum_ns = htons(firmware_csum);
drivers/media/usb/ttusb-dec/ttusb_dec.c
441
__be16 pcr = htons(dec->pid[DMX_PES_PCR]);
drivers/media/usb/ttusb-dec/ttusb_dec.c
442
__be16 audio = htons(dec->pid[DMX_PES_AUDIO]);
drivers/media/usb/ttusb-dec/ttusb_dec.c
443
__be16 video = htons(dec->pid[DMX_PES_VIDEO]);
drivers/media/usb/ttusb-dec/ttusb_dec.c
529
v_pes_payload_length = htons(dec->v_pes_length - 6 +
drivers/message/fusion/mptlan.c
1495
if (fch->dtype == htons(0xffff)) {
drivers/message/fusion/mptlan.c
1529
(fcllc->ethertype == htons(ETH_P_IP) ||
drivers/message/fusion/mptlan.c
1530
fcllc->ethertype == htons(ETH_P_ARP))) {
drivers/message/fusion/mptlan.c
1535
return htons(ETH_P_802_2);
drivers/net/amt.c
1039
skb_set_inner_protocol(skb, htons(ETH_P_IP));
drivers/net/amt.c
1041
skb_set_inner_protocol(skb, htons(ETH_P_IPV6));
drivers/net/amt.c
1097
skb_set_inner_protocol(skb, htons(ETH_P_IP));
drivers/net/amt.c
1099
skb_set_inner_protocol(skb, htons(ETH_P_IPV6));
drivers/net/amt.c
1156
skb_set_inner_protocol(skb, htons(ETH_P_IP));
drivers/net/amt.c
1158
skb_set_inner_protocol(skb, htons(ETH_P_IPV6));
drivers/net/amt.c
2301
if (iptunnel_pull_header(skb, hdr_size, htons(ETH_P_IP), false))
drivers/net/amt.c
2317
skb->protocol = htons(ETH_P_IP);
drivers/net/amt.c
2318
eth->h_proto = htons(ETH_P_IP);
drivers/net/amt.c
2330
skb->protocol = htons(ETH_P_IPV6);
drivers/net/amt.c
2331
eth->h_proto = htons(ETH_P_IPV6);
drivers/net/amt.c
2371
if (iptunnel_pull_header(skb, hdr_size, htons(ETH_P_TEB), false))
drivers/net/amt.c
2401
skb->protocol = htons(ETH_P_IP);
drivers/net/amt.c
2402
eth->h_proto = htons(ETH_P_IP);
drivers/net/amt.c
2427
skb->protocol = htons(ETH_P_IPV6);
drivers/net/amt.c
2428
eth->h_proto = htons(ETH_P_IPV6);
drivers/net/amt.c
2509
skb->protocol = htons(ETH_P_IP);
drivers/net/amt.c
2510
eth->h_proto = htons(ETH_P_IP);
drivers/net/amt.c
2528
skb->protocol = htons(ETH_P_IPV6);
drivers/net/amt.c
2529
eth->h_proto = htons(ETH_P_IPV6);
drivers/net/amt.c
2611
udph->len = htons(sizeof(*amta) + sizeof(*udph));
drivers/net/amt.c
2629
iph->tot_len = htons(len);
drivers/net/amt.c
3218
htons(IANA_AMT_UDP_PORT));
drivers/net/amt.c
3221
htons(IANA_AMT_UDP_PORT));
drivers/net/amt.c
532
skb->protocol = htons(ETH_P_IP);
drivers/net/amt.c
545
iph->tot_len = htons(sizeof(*iph) + AMT_IPHDR_OPTS + sizeof(*ihv3));
drivers/net/amt.c
546
iph->frag_off = htons(IP_DF);
drivers/net/amt.c
557
eth->h_proto = htons(ETH_P_IP);
drivers/net/amt.c
670
udph->len = htons(sizeof(*udph) + sizeof(*amtd));
drivers/net/amt.c
688
iph->tot_len = htons(len);
drivers/net/amt.c
761
udph->len = htons(sizeof(*amtrh) + sizeof(*udph));
drivers/net/amt.c
779
iph->tot_len = htons(len);
drivers/net/amt.c
829
skb->protocol = htons(ETH_P_IPV6);
drivers/net/amt.c
836
ip6h->payload_len = htons(sizeof(ra) + sizeof(*mld2q));
drivers/net/amt.c
849
eth->h_proto = htons(ETH_P_IPV6);
drivers/net/amt.c
856
mld2q->mld2q_mrc = htons(1);
drivers/net/arcnet/rfc1051.c
108
return htons(ETH_P_IP);
drivers/net/arcnet/rfc1051.c
110
return htons(ETH_P_ARP);
drivers/net/arcnet/rfc1051.c
118
return htons(ETH_P_IP);
drivers/net/arcnet/rfc1201.c
112
return htons(ETH_P_IP);
drivers/net/arcnet/rfc1201.c
114
return htons(ETH_P_IPV6);
drivers/net/arcnet/rfc1201.c
116
return htons(ETH_P_ARP);
drivers/net/arcnet/rfc1201.c
118
return htons(ETH_P_RARP);
drivers/net/arcnet/rfc1201.c
122
return htons(ETH_P_802_3);
drivers/net/arcnet/rfc1201.c
129
return htons(ETH_P_IP);
drivers/net/arcnet/rfc1201.c
424
soft->sequence = htons(lp->rfc1201.sequence++);
drivers/net/arcnet/rfc1201.c
459
excsoft.sequence = htons(0xffff);
drivers/net/bareudp.c
100
} else if (bareudp->ethertype == htons(ETH_P_MPLS_UC)) {
drivers/net/bareudp.c
109
proto = htons(ETH_P_MPLS_MC);
drivers/net/bareudp.c
125
proto = htons(ETH_P_MPLS_MC);
drivers/net/bareudp.c
320
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
drivers/net/bareudp.c
343
htons(IP_DF) : 0;
drivers/net/bareudp.c
390
if (skb_vlan_inet_prepare(skb, skb->protocol != htons(ETH_P_TEB)))
drivers/net/bareudp.c
451
if (bareudp->ethertype == htons(ETH_P_MPLS_UC) &&
drivers/net/bareudp.c
452
proto == htons(ETH_P_MPLS_MC))
drivers/net/bareudp.c
455
if (bareudp->ethertype == htons(ETH_P_IP) &&
drivers/net/bareudp.c
456
proto == htons(ETH_P_IPV6))
drivers/net/bareudp.c
662
(conf->ethertype != htons(ETH_P_MPLS_UC) &&
drivers/net/bareudp.c
663
conf->ethertype != htons(ETH_P_IP))) {
drivers/net/bareudp.c
77
if (skb->protocol == htons(ETH_P_IP))
drivers/net/bareudp.c
82
if (bareudp->ethertype == htons(ETH_P_IP)) {
drivers/net/bareudp.c
93
proto = htons(ETH_P_IP);
drivers/net/bareudp.c
95
proto = htons(ETH_P_IPV6);
drivers/net/bonding/bond_3ad.c
2025
.collector_max_delay = htons(AD_COLLECTOR_MAX_DELAY),
drivers/net/bonding/bond_3ad.c
885
lacpdu->actor_system_priority = htons(port->actor_system_priority);
drivers/net/bonding/bond_3ad.c
887
lacpdu->actor_key = htons(port->actor_oper_port_key);
drivers/net/bonding/bond_3ad.c
888
lacpdu->actor_port_priority = htons(port->actor_port_priority);
drivers/net/bonding/bond_3ad.c
889
lacpdu->actor_port = htons(port->actor_port_number);
drivers/net/bonding/bond_3ad.c
900
lacpdu->partner_system_priority = htons(partner->system_priority);
drivers/net/bonding/bond_3ad.c
902
lacpdu->partner_key = htons(partner->key);
drivers/net/bonding/bond_3ad.c
903
lacpdu->partner_port_priority = htons(partner->port_priority);
drivers/net/bonding/bond_3ad.c
904
lacpdu->partner_port = htons(partner->port_number);
drivers/net/bonding/bond_alb.c
1383
case htons(ETH_P_IPV6):
drivers/net/bonding/bond_alb.c
1387
case htons(ETH_P_IP):
drivers/net/bonding/bond_alb.c
296
if (arp->op_code == htons(ARPOP_REPLY)) {
drivers/net/bonding/bond_alb.c
451
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/bonding/bond_alb.c
678
if (arp->op_code == htons(ARPOP_REPLY)) {
drivers/net/bonding/bond_alb.c
686
} else if (arp->op_code == htons(ARPOP_REQUEST)) {
drivers/net/bonding/bond_main.c
3163
arp->ar_hrd != htons(ARPHRD_ETHER) ||
drivers/net/bonding/bond_main.c
3164
arp->ar_pro != htons(ETH_P_IP) ||
drivers/net/bonding/bond_main.c
3211
else if (curr_arp_slave && (arp->ar_op == htons(ARPOP_REPLY)) &&
drivers/net/bonding/bond_main.c
4120
if (l2_proto == htons(ETH_P_IP)) {
drivers/net/bonding/bond_main.c
4130
} else if (l2_proto == htons(ETH_P_IPV6)) {
drivers/net/bonding/bond_main.c
4965
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/bonding/bond_main.c
5006
if (eth->h_proto == htons(ETH_P_IP)) {
drivers/net/bonding/bond_main.c
5268
if (skb->protocol == htons(ETH_P_ARP))
drivers/net/bonding/bond_main.c
5271
if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/caif/caif_serial.c
181
skb->protocol = htons(ETH_P_CAIF);
drivers/net/caif/caif_virtio.c
295
skb->protocol = htons(ETH_P_CAIF);
drivers/net/can/dev/skb.c
230
skb->protocol = htons(ETH_P_CAN);
drivers/net/can/dev/skb.c
261
skb->protocol = htons(ETH_P_CANFD);
drivers/net/can/dev/skb.c
299
skb->protocol = htons(ETH_P_CANXL);
drivers/net/can/dev/skb.c
62
(skb->protocol != htons(ETH_P_CAN) &&
drivers/net/can/dev/skb.c
63
skb->protocol != htons(ETH_P_CANFD) &&
drivers/net/can/dev/skb.c
64
skb->protocol != htons(ETH_P_CANXL))) {
drivers/net/can/janz-ican3.c
1309
skb->protocol = htons(ETH_P_CAN);
drivers/net/dsa/bcm_sf2_cfp.c
351
__be16 vlan_tci = 0, vlan_m_tci = htons(0xffff);
drivers/net/dsa/bcm_sf2_cfp.c
632
__be16 vlan_tci = 0, vlan_m_tci = htons(0xffff);
drivers/net/dsa/lan9303-core.c
1115
vlan_vid_add(dsa_port_to_conduit(dp), htons(ETH_P_8021Q), port);
drivers/net/dsa/lan9303-core.c
1128
vlan_vid_del(dsa_port_to_conduit(dp), htons(ETH_P_8021Q), port);
drivers/net/dsa/mv88e6xxx/chip.c
2395
if (fs->m_ext.vlan_tci != htons(0xffff))
drivers/net/dsa/ocelot/felix.c
573
err = dsa_tag_8021q_register(ds, htons(ETH_P_8021AD));
drivers/net/dsa/qca/qca8k-8xxx.c
283
mgmt_ethhdr->hdr = htons(hdr);
drivers/net/dsa/sja1105/sja1105_main.c
3079
rc = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q));
drivers/net/dsa/vitesse-vsc73xx-core.c
945
ret = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q));
drivers/net/ethernet/3com/3c509.c
243
phys_addr[i] = htons(id_read_eeprom(i));
drivers/net/ethernet/3com/3c509.c
415
phys_addr[i] = htons(read_eeprom(ioaddr, i));
drivers/net/ethernet/3com/3c509.c
579
phys_addr[i] = htons(read_eeprom(ioaddr, i));
drivers/net/ethernet/3com/3c515.c
633
addr[i] = htons(eeprom[i]);
drivers/net/ethernet/3com/3c574_cs.c
348
addr[i] = htons(le16_to_cpu(buf[i * 2]));
drivers/net/ethernet/3com/3c574_cs.c
354
addr[i] = htons(read_eeprom(ioaddr, i + 10));
drivers/net/ethernet/3com/3c574_cs.c
355
if (addr[0] == htons(0x6060)) {
drivers/net/ethernet/3com/3c589_cs.c
296
addr[i] = htons(le16_to_cpu(buf[i*2]));
drivers/net/ethernet/3com/3c589_cs.c
301
addr[i] = htons(read_eeprom(ioaddr, i));
drivers/net/ethernet/3com/3c589_cs.c
302
if (addr[0] == htons(0x6060)) {
drivers/net/ethernet/3com/3c59x.c
1288
addr[i] = htons(eeprom[i + 10]);
drivers/net/ethernet/3com/typhoon.c
1691
__vlan_hwaccel_put_tag(new_skb, htons(ETH_P_8021Q),
drivers/net/ethernet/3com/typhoon.c
2427
*(__be16 *)&addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
drivers/net/ethernet/3com/typhoon.c
769
cpu_to_le32(htons(skb_vlan_tag_get(skb)) <<
drivers/net/ethernet/adaptec/starfire.c
1518
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlid);
drivers/net/ethernet/airoha/airoha_ppe.c
1084
act->vlan.proto != htons(ETH_P_8021Q))
drivers/net/ethernet/alteon/acenic.c
1989
skb->csum = htons(csum);
drivers/net/ethernet/alteon/acenic.c
1997
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), retdesc->vlan);
drivers/net/ethernet/altera/altera_tse_main.c
345
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/amazon/ena/ena_netdev.c
2441
if (ip_hdr(skb)->frag_off & htons(IP_DF))
drivers/net/ethernet/amd/amd8111e.c
759
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
1470
case htons(ETH_P_IP):
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
1475
case htons(ETH_P_IPV6):
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
1485
skb->inner_protocol != htons(ETH_P_TEB) ||
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
2343
(skb->protocol == htons(ETH_P_8021Q)))
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
2372
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/amd/xgbe/xgbe-selftest.c
122
tdata->pt.type = htons(ETH_P_IP);
drivers/net/ethernet/amd/xgbe/xgbe-selftest.c
81
if (th->dest != htons(tdata->packet->dport))
drivers/net/ethernet/amd/xgbe/xgbe-selftest.c
90
if (uh->dest != htons(tdata->packet->dport))
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
171
return (eth->h_proto == htons(ETH_P_8021Q)) ? VLAN_ETH_HLEN : ETH_HLEN;
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
319
if (unlikely(skb->protocol != htons(ETH_P_IP)) &&
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
320
unlikely(skb->protocol != htons(ETH_P_8021Q)))
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
596
if (skb->protocol != htons(ETH_P_IP))
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
651
skb->protocol == htons(ETH_P_8021Q))
drivers/net/ethernet/aquantia/atlantic/aq_main.c
119
((udp_hdr(skb)->dest == htons(319)) ||
drivers/net/ethernet/aquantia/atlantic/aq_main.c
120
(udp_hdr(skb)->dest == htons(320)))) ||
drivers/net/ethernet/aquantia/atlantic/aq_main.c
121
unlikely(eth_hdr(skb)->h_proto == htons(ETH_P_1588)))
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
748
dx_buff->is_ip_cso = (htons(ETH_P_IP) == skb->protocol);
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
675
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
820
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
1407
return (eth->h_proto == htons(ETH_P_1588)) ? 12 : 14;
drivers/net/ethernet/atheros/alx/main.c
1438
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
61
*(u16 *) ð_addr[0] = htons((u16)addr[1]);
drivers/net/ethernet/atheros/atl1c/atl1c_main.c
1942
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
drivers/net/ethernet/atheros/atl1e/atl1e_main.c
1468
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/atheros/atl1e/atl1e_main.c
1613
if (skb->protocol == htons(ETH_P_IP) ||
drivers/net/ethernet/atheros/atl1e/atl1e_main.c
1897
if (skb->protocol == htons(ETH_P_8021Q))
drivers/net/ethernet/atheros/atlx/atl1.c
2019
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/atheros/atlx/atl1.c
2118
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/atheros/atlx/atl1.c
2405
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/atheros/atlx/atl2.c
434
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
338
val_16 = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
339
mask_16 = htons(0xFFFF);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
367
val_16 = htons(ETH_P_IPV6);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
368
mask_16 = htons(0xFFFF);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
371
val_16 = htons(match->tclass << 4);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
372
mask_16 = htons(mask->tclass << 4);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
439
val_16 = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/asp2/bcmasp.c
440
mask_16 = htons(0xFFFF);
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
180
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
187
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/bcmsysport.c
1250
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/bcmsysport.c
1253
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/bcmsysport.c
1271
ip_ver == htons(ETH_P_IP))
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
1482
if (skb->vlan_proto == htons(ETH_P_8021Q))
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
504
if (ip_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
682
__be16 vlan_proto = htons(tpa_info->metadata >>
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
742
htons(meta_data >> RX_CMP_FLAGS2_METADATA_TPID_SFT);
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
752
vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/broadcom/bnge/bnge_txrx.c
754
vlan_proto = htons(ETH_P_8021AD);
drivers/net/ethernet/broadcom/bnx2.c
3246
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rx_hdr->l2_fhdr_vlan_tag);
drivers/net/ethernet/broadcom/bnx2.c
3251
skb->protocol != htons(0x8100) &&
drivers/net/ethernet/broadcom/bnx2.c
3252
skb->protocol != htons(ETH_P_8021AD)) {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
1102
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
3372
if (protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
818
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tpa_info->vlan_tag);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
2541
htons(ETH_P_8021Q));
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
2818
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13962
if (skb->inner_protocol == htons(ETH_P_TEB)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13966
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13968
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13973
} else if (skb->inner_protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13975
} else if (skb->inner_protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13993
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
13995
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14016
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
14023
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/bnxt/bnxt.c
15594
if (keys1->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
15675
if ((fkeys->basic.n_proto != htons(ETH_P_IP) &&
drivers/net/ethernet/broadcom/bnxt/bnxt.c
15676
fkeys->basic.n_proto != htons(ETH_P_IPV6)) ||
drivers/net/ethernet/broadcom/bnxt/bnxt.c
15683
if (fkeys->basic.n_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
1638
if (ip_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
1686
if (proto != htons(ETH_P_IP) && proto != htons(ETH_P_IPV6))
drivers/net/ethernet/broadcom/bnxt/bnxt.c
1971
__be16 vlan_proto = htons(tpa_info->metadata >>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2054
vlan_proto = htons(meta_data >> RX_CMP_FLAGS2_METADATA_TPID_SFT);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2064
vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
2066
vlan_proto = htons(ETH_P_8021AD);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
538
if (skb->vlan_proto == htons(ETH_P_8021Q))
drivers/net/ethernet/broadcom/bnxt/bnxt.c
5980
if (fkeys->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
5989
if (fkeys->basic.n_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
6014
if (fkeys->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
6343
req->ethertype = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/bnxt/bnxt.c
6347
if (keys->basic.n_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnxt/bnxt.c
6348
req->ethertype = htons(ETH_P_IPV6);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1129
m_ext->vlan_tci = htons(0xfff);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1130
h_ext->vlan_tci = htons(l2_key->vlan);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1151
if (fkeys->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1284
if (m_ext->vlan_tci != htons(0xfff) || !h_ext->vlan_tci)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1389
fkeys->basic.n_proto = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1404
fkeys->basic.n_proto = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1421
fkeys->basic.n_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
1436
fkeys->basic.n_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
257
if (vlan_proto != htons(ETH_P_8021Q) &&
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
258
(vlan_proto != htons(ETH_P_8021AD) ||
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
1267
l2_info->inner_vlan_tci = htons(vlan->vlan_id);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
266
actions->nat.l4.ports.sport = htons(val);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
268
actions->nat.l4.ports.dport = htons(val);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
394
if (match.key->n_proto == htons(ETH_P_IP) ||
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
395
match.key->n_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
422
flow->l2_key.inner_vlan_tpid = htons(ETH_P_8021Q);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
423
flow->l2_mask.inner_vlan_tpid = htons(0xffff);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
708
flow_flags |= flow->l2_key.ether_type == htons(ETH_P_IP) ?
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
738
req->l4_src_port = htons(flow->l4_key.icmp.type);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
739
req->l4_src_port_mask = htons(flow->l4_mask.icmp.type);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
740
req->l4_dst_port = htons(flow->l4_key.icmp.code);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
741
req->l4_dst_port_mask = htons(flow->l4_mask.icmp.code);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
831
req->ethertype = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
93
actions->push_vlan_tci = htons(act->vlan.vid);
drivers/net/ethernet/broadcom/genet/bcmgenet.c
2083
case htons(ETH_P_IP):
drivers/net/ethernet/broadcom/genet/bcmgenet.c
2086
case htons(ETH_P_IPV6):
drivers/net/ethernet/broadcom/genet/bcmgenet.c
649
val_16 = htons(ETH_P_IP);
drivers/net/ethernet/broadcom/tg3.c
13544
iph->tot_len = htons((u16)(mss + hdr_len));
drivers/net/ethernet/broadcom/tg3.c
6962
skb->protocol != htons(ETH_P_8021Q) &&
drivers/net/ethernet/broadcom/tg3.c
6963
skb->protocol != htons(ETH_P_8021AD)) {
drivers/net/ethernet/broadcom/tg3.c
6970
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/broadcom/tg3.c
8019
if (skb->protocol == htons(ETH_P_8021Q) ||
drivers/net/ethernet/broadcom/tg3.c
8020
skb->protocol == htons(ETH_P_8021AD)) {
drivers/net/ethernet/broadcom/tg3.c
8036
iph->tot_len = htons(mss + hdr_len);
drivers/net/ethernet/broadcom/tg3.c
8082
if (skb->protocol == htons(ETH_P_8021Q) ||
drivers/net/ethernet/broadcom/tg3.c
8083
skb->protocol == htons(ETH_P_8021AD)) {
drivers/net/ethernet/brocade/bna/bfa_ioc.c
1924
enable_req.clscode = htons(ioc->clscode);
drivers/net/ethernet/brocade/bna/bfa_ioc.c
1925
enable_req.rsvd = htons(0);
drivers/net/ethernet/brocade/bna/bfa_ioc.c
1938
disable_req.clscode = htons(ioc->clscode);
drivers/net/ethernet/brocade/bna/bfa_ioc.c
1939
disable_req.rsvd = htons(0);
drivers/net/ethernet/brocade/bna/bfa_msgq.c
193
dbell->idx.cmdq_pi = htons(cmdq->producer_index);
drivers/net/ethernet/brocade/bna/bfa_msgq.c
284
rsp->mh.mtag.i2htok = htons(cmdq->token);
drivers/net/ethernet/brocade/bna/bfa_msgq.c
449
dbell->idx.rspq_ci = htons(rspq->consumer_index);
drivers/net/ethernet/brocade/bna/bfa_msgq.c
516
msgq_cfg->cmdq.q_depth = htons(msgq->cmdq.depth);
drivers/net/ethernet/brocade/bna/bfa_msgq.c
518
msgq_cfg->rspq.q_depth = htons(msgq->rspq.depth);
drivers/net/ethernet/brocade/bna/bna_enet.c
1164
pause_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
1626
attr_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
1848
stats_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
1850
stats_req->stats_mask = htons(BFI_ENET_STATS_ALL);
drivers/net/ethernet/brocade/bna/bna_enet.c
412
admin_up_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
429
admin_down_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
446
lpbk_up_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_enet.c
467
lpbk_down_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1297
(bfi_q)->pages = htons((u16)(bna_qpt)->page_count); \
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1298
(bfi_q)->page_sz = htons((u16)(bna_qpt)->page_size);\
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1622
cfg_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1638
htons((u16)q1->buffer_size);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1657
htons((u16)q0->buffer_size);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1672
htons((u16)rxp->cq.ib.intr_vector);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1721
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
185
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
201
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
217
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
219
req->handle = htons(handle);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
232
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
247
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
264
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
287
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
302
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
304
req->size = htons(rxf->rit_size);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
3094
cfg_req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
3109
htons((u16)txq->ib.intr_vector);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
3125
cfg_req->tx_cfg.vlan_id = htons((u16)tx->txf_vlan_id);
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
3141
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
319
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
338
req->mh.num_entries = htons(
drivers/net/ethernet/brocade/bna/bnad.c
2494
if (vlan_get_protocol(skb) == htons(ETH_P_IP)) {
drivers/net/ethernet/brocade/bna/bnad.c
2818
txqent->hdr.wi.vlan_tag = htons(vlan_tag);
drivers/net/ethernet/brocade/bna/bnad.c
2827
txqent->hdr.wi.opcode = htons(BNA_TXQ_WI_SEND);
drivers/net/ethernet/brocade/bna/bnad.c
2831
txqent->hdr.wi.opcode = htons(BNA_TXQ_WI_SEND_LSO);
drivers/net/ethernet/brocade/bna/bnad.c
2832
txqent->hdr.wi.lso_mss = htons(gso_size);
drivers/net/ethernet/brocade/bna/bnad.c
2842
htons(BNA_TXQ_WI_L4_HDR_N_OFFSET(
drivers/net/ethernet/brocade/bna/bnad.c
2845
txqent->hdr.wi.opcode = htons(BNA_TXQ_WI_SEND);
drivers/net/ethernet/brocade/bna/bnad.c
2857
if (net_proto == htons(ETH_P_IP))
drivers/net/ethernet/brocade/bna/bnad.c
2860
else if (net_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/brocade/bna/bnad.c
2868
htons(BNA_TXQ_WI_L4_HDR_N_OFFSET
drivers/net/ethernet/brocade/bna/bnad.c
2881
htons(BNA_TXQ_WI_L4_HDR_N_OFFSET
drivers/net/ethernet/brocade/bna/bnad.c
2900
txqent->hdr.wi.flags = htons(flags);
drivers/net/ethernet/brocade/bna/bnad.c
3022
txqent->vector[0].length = htons(len);
drivers/net/ethernet/brocade/bna/bnad.c
3046
txqent->hdr.wi_ext.opcode = htons(BNA_TXQ_WI_EXTENSION);
drivers/net/ethernet/brocade/bna/bnad.c
3063
txqent->vector[vect_id].length = htons(size);
drivers/net/ethernet/brocade/bna/bnad.c
713
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(cmpl->vlan_tag));
drivers/net/ethernet/cavium/liquidio/lio_core.c
697
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vtag);
drivers/net/ethernet/cavium/liquidio/lio_main.c
2683
htons(ti->port),
drivers/net/ethernet/cavium/liquidio/lio_main.c
2694
htons(ti->port),
drivers/net/ethernet/cavium/liquidio/lio_main.c
2921
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
1771
htons(ti->port),
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
1782
htons(ti->port),
drivers/net/ethernet/cavium/thunder/nicvf_main.c
836
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/chelsio/cxgb/sge.c
1381
skb->protocol == htons(ETH_P_IP) &&
drivers/net/ethernet/chelsio/cxgb/sge.c
1390
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(p->vlan));
drivers/net/ethernet/chelsio/cxgb/sge.c
1802
return e->h_proto == htons(ETH_P_8021Q) ? VLAN_ETH_HLEN : ETH_HLEN;
drivers/net/ethernet/chelsio/cxgb/sge.c
1817
if (skb->protocol == htons(ETH_P_CPL5))
drivers/net/ethernet/chelsio/cxgb/sge.c
1846
hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type,
drivers/net/ethernet/chelsio/cxgb/sge.c
1878
if (skb->protocol == htons(ETH_P_ARP) &&
drivers/net/ethernet/chelsio/cxgb/sge.c
1879
arp_hdr(skb)->ar_op == htons(ARPOP_REQUEST)) {
drivers/net/ethernet/chelsio/cxgb/sge.c
1901
cpl->vlan = htons(skb_vlan_tag_get(skb));
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
1065
req->word = htons(W_TCB_L2T_IX);
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
188
dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), vlan);
drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
881
skb->protocol = htons(0xffff);
drivers/net/ethernet/chelsio/cxgb3/sge.c
2035
if (arp->ar_op != htons(ARPOP_REQUEST))
drivers/net/ethernet/chelsio/cxgb3/sge.c
2056
return skb->protocol == htons(ETH_P_ARP);
drivers/net/ethernet/chelsio/cxgb3/sge.c
2095
p->csum == htons(0xffff) && !p->fragment) {
drivers/net/ethernet/chelsio/cxgb3/sge.c
2104
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(p->vlan));
drivers/net/ethernet/chelsio/cxgb3/sge.c
2176
cpl->csum_valid && cpl->csum == htons(0xffff)) {
drivers/net/ethernet/chelsio/cxgb3/sge.c
2202
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(cpl->vlan));
drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c
237
root_dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), i);
drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
2624
htons(FW_LDST_CMD_FID_V(FW_LDST_MPS_RPLC) |
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
1788
htons(FW_LDST_CMD_FID_V(FW_LDST_MPS_RPLC) |
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
133
req->reply_ctrl = htons(NO_REPLY_V(no_reply) | REPLY_CHAN_V(0) |
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
135
req->word_cookie = htons(TCB_WORD_V(word) | TCB_COOKIE_V(cookie));
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
69
req->reply_ctrl = htons(REPLY_CHAN_V(0) |
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
72
req->word_cookie = htons(TCB_WORD_V(word) | TCB_COOKIE_V(ftid));
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
874
fwr->ethtype = htons(f->fs.val.ethtype);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
875
fwr->ethtypem = htons(f->fs.mask.ethtype);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
886
htons(FW_FILTER_WR_RX_CHAN_V(0) |
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
901
fwr->ivlan = htons(f->fs.val.ivlan);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
902
fwr->ivlanm = htons(f->fs.mask.ivlan);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
903
fwr->ovlan = htons(f->fs.val.ovlan);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
904
fwr->ovlanm = htons(f->fs.mask.ovlan);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
909
fwr->lp = htons(f->fs.val.lport);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
910
fwr->lpm = htons(f->fs.mask.lport);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
911
fwr->fp = htons(f->fs.val.fport);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
912
fwr->fpm = htons(f->fs.mask.fport);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
925
fwr->newlport = htons(nat_lp[1] | nat_lp[0] << 8);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
926
fwr->newfport = htons(nat_fp[1] | nat_fp[0] << 8);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
1158
if (skb->protocol == htons(ETH_P_FCOE))
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
1944
req->peer_port = htons(0);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
1985
req->peer_port = htons(0);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
2016
req->reply_ctrl = htons(NO_REPLY_V(0) | (ipv6 ? LISTSVR_IPV6_V(1) :
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
3389
if (vlan_proto != htons(ETH_P_8021Q) || qos != 0)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
5164
(caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_HASHFILTER)) ||
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
5165
(caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_ETHOFLD))) {
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
5202
if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_HASHFILTER)) {
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
5208
if (caps_cmd.niccaps & htons(FW_CAPS_CONFIG_NIC_ETHOFLD)) {
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
65
likely(skb->protocol == htons(ETH_P_IP)) &&
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
67
uh->dest == htons(PTP_EVENT_PORT);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
89
return uh->dest == htons(PTP_EVENT_PORT) &&
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c
90
uh->source == htons(PTP_EVENT_PORT);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
167
if (protocol != htons(ETH_P_IP) && protocol != htons(ETH_P_IPV6))
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
170
inet_family = (protocol == htons(ETH_P_IPV6)) ? PF_INET6 : PF_INET;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
205
if (protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/chelsio/cxgb4/l2t.c
155
req->params = htons(L2T_W_PORT_V(e->lport) | L2T_W_NOREPLY_V(!sync));
drivers/net/ethernet/chelsio/cxgb4/l2t.c
156
req->l2t_idx = htons(l2t_idx);
drivers/net/ethernet/chelsio/cxgb4/l2t.c
157
req->vlan = htons(e->vlan);
drivers/net/ethernet/chelsio/cxgb4/sge.c
1242
if (skb->protocol != htons(ETH_P_FCOE))
drivers/net/ethernet/chelsio/cxgb4/sge.c
1275
skb->inner_protocol != htons(ETH_P_TEB))
drivers/net/ethernet/chelsio/cxgb4/sge.c
1279
case htons(ETH_P_IP):
drivers/net/ethernet/chelsio/cxgb4/sge.c
1282
case htons(ETH_P_IPV6):
drivers/net/ethernet/chelsio/cxgb4/sge.c
1336
htons(CPL_TX_TNL_LSO_UDPCHKCLROUT_F |
drivers/net/ethernet/chelsio/cxgb4/sge.c
1345
htons(CPL_TX_TNL_LSO_TNLHDRLEN_V(val) |
drivers/net/ethernet/chelsio/cxgb4/sge.c
1356
tnl_lso->IpIdOffset = htons(0);
drivers/net/ethernet/chelsio/cxgb4/sge.c
1358
tnl_lso->IpIdSplit_to_Mss = htons(CPL_TX_TNL_LSO_MSS_V(ssi->gso_size));
drivers/net/ethernet/chelsio/cxgb4/sge.c
1381
lso->ipid_ofst = htons(0);
drivers/net/ethernet/chelsio/cxgb4/sge.c
1382
lso->mss = htons(ssi->gso_size);
drivers/net/ethernet/chelsio/cxgb4/sge.c
1687
if (skb->protocol == htons(ETH_P_FCOE))
drivers/net/ethernet/chelsio/cxgb4/sge.c
1704
cpl->pack = htons(0);
drivers/net/ethernet/chelsio/cxgb4/sge.c
1705
cpl->len = htons(skb->len);
drivers/net/ethernet/chelsio/cxgb4/sge.c
2699
cpl->pack = htons(0);
drivers/net/ethernet/chelsio/cxgb4/sge.c
2700
cpl->len = htons(pkt_len);
drivers/net/ethernet/chelsio/cxgb4/sge.c
3402
skb->protocol = htons(0xffff);
drivers/net/ethernet/chelsio/cxgb4/sge.c
3463
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(pkt->vlan));
drivers/net/ethernet/chelsio/cxgb4/sge.c
3793
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(pkt->vlan));
drivers/net/ethernet/chelsio/cxgb4/sge.c
4392
c.iqdroprss_to_iqesize = htons(FW_IQ_CMD_IQPCIECH_V(pi->tx_chan) |
drivers/net/ethernet/chelsio/cxgb4/sge.c
4396
c.iqsize = htons(iq->size);
drivers/net/ethernet/chelsio/cxgb4/sge.c
4443
htons(FW_IQ_CMD_FL0FBMIN_V(chip_ver <= CHELSIO_T5 ?
drivers/net/ethernet/chelsio/cxgb4/sge.c
4449
c.fl0size = htons(flsz);
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
1665
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c
491
cpl->pack = htons(0);
drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c
492
cpl->len = htons(skb->len);
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
1045
cpl->len = htons(pktlen);
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
1051
ip->tot_len = htons(pktlen - maclen);
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
1055
ip6->payload_len = htons(pktlen - maclen - iplen);
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
1636
cpl->len = htons(skb->len);
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
343
req->reply_ctrl = htons(QUEUENO_V(tx_info->rx_qid) |
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
345
req->word_cookie = htons(TCB_WORD_V(word));
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
767
cpl->reply_ctrl = htons(QUEUENO_V(tx_info->rx_qid) |
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
769
cpl->word_cookie = htons(TCB_WORD_V(word));
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
1153
fl6.fl6_sport = htons(inet_rsk(oreq)->ir_num);
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c
31
req->reply_ctrl = htons(NO_REPLY_V(no_reply) |
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c
33
req->word_cookie = htons(TCB_WORD_V(word) | TCB_COOKIE_V(cookie));
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_hw.c
395
kwr->wr.mfs = htons(TLS_MFS);
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
405
req_wr->mfs = htons(hws->mfs);
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
407
htons(FW_TLSTX_DATA_WR_ADJUSTEDPLEN_V(hws->adjustlen));
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
409
htons(FW_TLSTX_DATA_WR_EXPINPLENMAX_V(hws->expansion));
drivers/net/ethernet/cisco/enic/enic_clsf.c
182
if (!res || keys.basic.n_proto != htons(ETH_P_IP) ||
drivers/net/ethernet/cisco/enic/enic_main.c
257
case htons(ETH_P_IPV6):
drivers/net/ethernet/cisco/enic/enic_main.c
262
case htons(ETH_P_IP):
drivers/net/ethernet/cisco/enic/enic_pp.c
60
const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
drivers/net/ethernet/cisco/enic/enic_rq.c
163
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tci);
drivers/net/ethernet/cisco/enic/vnic_vic.c
50
tlv->type = htons(type);
drivers/net/ethernet/cisco/enic/vnic_vic.c
51
tlv->length = htons(length);
drivers/net/ethernet/cortina/gemini.c
1155
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/cortina/gemini.c
1215
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/emulex/benet/be.h
916
return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4;
drivers/net/ethernet/emulex/benet/be_main.c
1070
skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/emulex/benet/be_main.c
1080
skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/emulex/benet/be_main.c
1095
if (eh->h_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/emulex/benet/be_main.c
1149
veh->h_vlan_proto == htons(ETH_P_8021Q))
drivers/net/ethernet/emulex/benet/be_main.c
1268
#define is_arp(skb) (skb->protocol == htons(ETH_P_ARP))
drivers/net/ethernet/emulex/benet/be_main.c
1318
if ((*skb)->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/emulex/benet/be_main.c
1989
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/emulex/benet/be_main.c
2426
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rxcp->vlan_tag);
drivers/net/ethernet/emulex/benet/be_main.c
2485
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rxcp->vlan_tag);
drivers/net/ethernet/emulex/benet/be_main.c
5100
case htons(ETH_P_IP):
drivers/net/ethernet/emulex/benet/be_main.c
5103
case htons(ETH_P_IPV6):
drivers/net/ethernet/emulex/benet/be_main.c
5112
skb->inner_protocol != htons(ETH_P_TEB) ||
drivers/net/ethernet/engleder/tsnep_rxnfc.c
115
fsp->h_u.ether_spec.h_proto = htons(rule->filter.ether_type);
drivers/net/ethernet/faraday/ftgmac100.c
583
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
850
*(__be16 *)(data + offset2) = htons(origin_timestamp.sec_msb);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
412
*(__be16 *)(key + off) = htons(tmp_value >> 16);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
413
*(__be16 *)(mask + off) = htons(tmp_mask >> 16);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
417
*(__be16 *)(key + off) = htons(tmp_value & 0xFFFF);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
418
*(__be16 *)(mask + off) = htons(tmp_mask & 0xFFFF);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
424
*(__be16 *)(key + off) = htons(ETH_P_IP);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
425
*(__be16 *)(mask + off) = htons(0xFFFF);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
470
*(__be16 *)(key + off) = htons(ETH_P_IP);
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
471
*(__be16 *)(mask + off) = htons(0xFFFF);
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
2064
__be16 vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
2074
__be16 vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/freescale/enetc/enetc.c
1420
skb->csum = csum_unfold((__force __sum16)~htons(inet_csum));
drivers/net/ethernet/freescale/enetc/enetc.c
1430
tpid = htons(ETH_P_8021Q);
drivers/net/ethernet/freescale/enetc/enetc.c
1433
tpid = htons(ETH_P_8021AD);
drivers/net/ethernet/freescale/enetc/enetc.c
1436
tpid = htons(enetc_rd_hot(hw, ENETC_SICVLANR1) &
drivers/net/ethernet/freescale/enetc/enetc.c
1440
tpid = htons(enetc_rd_hot(hw, ENETC_SICVLANR2) &
drivers/net/ethernet/freescale/enetc/enetc.c
207
return vlan_get_protocol(skb) == htons(ETH_P_IPV6);
drivers/net/ethernet/freescale/enetc/enetc.c
288
new_sec_h = htons((sec >> 32) & 0xffff);
drivers/net/ethernet/freescale/enetc/enetc_pf.c
272
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/freescale/fec_main.c
1796
htons(ETH_P_8021Q),
drivers/net/ethernet/freescale/fec_main.c
449
return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4;
drivers/net/ethernet/freescale/gianfar.c
2449
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
783
htons(inw(ioaddr + TX_STATUS)),
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
788
htons(inw(ioaddr + 0)), htons(inw(ioaddr + 2)),
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
789
htons(inw(ioaddr + 4)), htons(inw(ioaddr + 6)),
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
790
htons(inw(ioaddr + 8)), htons(inw(ioaddr + 10)),
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
791
htons(inw(ioaddr + 12)), htons(inw(ioaddr + 14)));
drivers/net/ethernet/fungible/funeth/funeth_main.c
1240
if (vlan_proto && vlan_proto != htons(ETH_P_8021Q) &&
drivers/net/ethernet/fungible/funeth/funeth_main.c
1241
vlan_proto != htons(ETH_P_8021AD))
drivers/net/ethernet/hisilicon/hns/hns_enet.c
1558
ethhdr->h_proto = htons(ETH_P_IP);
drivers/net/ethernet/hisilicon/hns/hns_enet.c
177
if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/hisilicon/hns/hns_enet.c
183
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns/hns_enet.c
188
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/hisilicon/hns/hns_enet.c
77
if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/hisilicon/hns/hns_enet.c
83
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns/hns_enet.c
97
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1271
if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1277
} else if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1331
(l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) ||
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1332
l4.udp->dest == htons(GENEVE_UDP_PORT) ||
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1333
l4.udp->dest == htons(IANA_VXLAN_GPE_UDP_PORT))))
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1364
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1373
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1511
if (!(skb->protocol == htons(ETH_P_8021Q) ||
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1526
if (skb->protocol == htons(ETH_P_8021Q) &&
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
1540
if (skb->protocol == htons(ETH_P_8021Q) &&
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
2957
if ((fkeys.basic.n_proto != htons(ETH_P_IP) &&
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
2958
fkeys.basic.n_proto != htons(ETH_P_IPV6)) ||
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
3028
if (protocol == htons(ETH_P_8021Q))
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
3031
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
3033
else if (protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
3882
if (type == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
3890
} else if (type == htons(ETH_P_IPV6)) {
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
4298
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
178
ethh->h_proto = htons(ETH_P_ARP);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10078
return hclge_set_vlan_filter(handle, htons(ETH_P_8021Q), 0, false);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10119
ret = hclge_set_vlan_filter_hw(hdev, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10149
htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10171
htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10228
ret = hclge_set_vlan_filter_hw(hdev, htons(vlan_proto),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10246
ret = hclge_set_vlan_filter_hw(hdev, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10346
htons(new_info->vlan_proto),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10359
ret = hclge_set_vlan_filter_hw(hdev, htons(old_info->vlan_proto),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10388
ret = hclge_set_vlan_filter_hw(hdev, htons(new_info->vlan_proto),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10400
ret = hclge_set_vlan_filter_hw(hdev, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10493
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10545
ret = hclge_set_vlan_filter_hw(hdev, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
10660
ret = hclge_set_vlan_filter_hw(hdev, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
3540
ivf->vlan_proto = htons(vport->port_base_vlan_cfg.vlan_info.vlan_proto);
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
7036
if (fkeys->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
1234
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
1280
ret = hclgevf_set_vlan_filter(handle, htons(ETH_P_8021Q),
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
2232
return hclgevf_set_vlan_filter(&hdev->nic, htons(ETH_P_8021Q), 0,
drivers/net/ethernet/huawei/hinic/hinic_rx.c
415
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/huawei/hinic/hinic_sriov.c
798
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
369
skb_shinfo(skb)->gso_type = proto == htons(ETH_P_IP) ?
drivers/net/ethernet/ibm/ehea/ehea_main.c
1961
if (vlan_get_protocol(skb) != htons(ETH_P_IP))
drivers/net/ethernet/ibm/ehea/ehea_main.c
729
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/ibm/ibmveth.c
1245
((skb->protocol == htons(ETH_P_IP) &&
drivers/net/ethernet/ibm/ibmveth.c
1247
(skb->protocol == htons(ETH_P_IPV6) &&
drivers/net/ethernet/ibm/ibmveth.c
1339
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/ibm/ibmveth.c
1348
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/ibm/ibmvnic.c
2186
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/ibm/ibmvnic.c
2191
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/ibm/ibmvnic.c
2571
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/ibm/ibmvnic.c
2574
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/ibm/ibmvnic.c
3586
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/e1000/e1000_main.c
1460
e1000_vlan_rx_kill_vid(netdev, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/e1000/e1000_main.c
2714
if (protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/intel/e1000/e1000_main.c
311
e1000_vlan_rx_add_vid(netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000/e1000_main.c
318
e1000_vlan_rx_kill_vid(netdev, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/e1000/e1000_main.c
3237
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/e1000/e1000_main.c
4007
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000/e1000_main.c
4294
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000/e1000_main.c
5014
e1000_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000e/netdev.c
2763
e1000_vlan_rx_kill_vid(netdev, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/e1000e/netdev.c
2825
e1000_vlan_rx_add_vid(netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000e/netdev.c
2830
e1000_vlan_rx_kill_vid(netdev, htons(ETH_P_8021Q), old_vid);
drivers/net/ethernet/intel/e1000e/netdev.c
2837
e1000_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
drivers/net/ethernet/intel/e1000e/netdev.c
2840
e1000_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/e1000e/netdev.c
4772
e1000_vlan_rx_kill_vid(netdev, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/e1000e/netdev.c
5474
if (protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/intel/e1000e/netdev.c
564
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tag);
drivers/net/ethernet/intel/e1000e/netdev.c
5749
if (((struct ethhdr *)skb->data)->h_proto != htons(ETH_P_IP))
drivers/net/ethernet/intel/e1000e/netdev.c
5903
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/fm10k/fm10k_iov.c
607
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/intel/fm10k/fm10k_main.c
468
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/fm10k/fm10k_main.c
470
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/fm10k/fm10k_main.c
645
#define FM10K_NVGRE_RESERVED0_FLAGS htons(0x9FFF)
drivers/net/ethernet/intel/fm10k/fm10k_main.c
646
#define NVGRE_TNI htons(0x2000)
drivers/net/ethernet/intel/fm10k/fm10k_main.c
659
if (vlan_get_protocol(skb) != htons(ETH_P_IP))
drivers/net/ethernet/intel/fm10k/fm10k_main.c
682
skb->inner_protocol != htons(ETH_P_TEB))
drivers/net/ethernet/intel/fm10k/fm10k_main.c
686
case htons(ETH_P_IP):
drivers/net/ethernet/intel/fm10k/fm10k_main.c
689
case htons(ETH_P_IPV6):
drivers/net/ethernet/intel/fm10k/fm10k_main.c
711
case htons(ETH_P_IP):
drivers/net/ethernet/intel/fm10k/fm10k_main.c
714
case htons(ETH_P_IPV6):
drivers/net/ethernet/intel/fm10k/fm10k_main.c
826
case htons(ETH_P_IP):
drivers/net/ethernet/intel/fm10k/fm10k_main.c
829
case htons(ETH_P_IPV6):
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
520
if ((skb->protocol == htons(ETH_P_8021Q)) &&
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
549
htons(ETH_P_8021Q),
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
553
htons(ETH_P_802_2);
drivers/net/ethernet/intel/i40e/i40e_dcb.c
1034
tlv->typelength = htons(typelength);
drivers/net/ethernet/intel/i40e/i40e_dcb.c
1096
tlv->typelength = htons(typelength);
drivers/net/ethernet/intel/i40e/i40e_dcb.c
1166
tlv->typelength = htons(typelength);
drivers/net/ethernet/intel/i40e/i40e_dcb.c
959
tlv->typelength = htons(typelength);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
3468
fsp->m_u.tcp_ip4_spec.psrc = htons(0xFFFF);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
3471
fsp->m_u.tcp_ip4_spec.pdst = htons(0xFFFF);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
3480
fsp->m_ext.vlan_etype = htons(0xFFFF);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
3482
fsp->m_ext.vlan_tci = htons(0xFFFF);
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4389
if (tcp_ip4_spec->psrc == htons(0xFFFF))
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4397
if (tcp_ip4_spec->pdst == htons(0xFFFF))
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4437
if (tcp_ip6_spec->psrc == htons(0xFFFF))
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4445
if (tcp_ip6_spec->pdst == htons(0xFFFF))
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4535
if (fsp->h_ext.vlan_etype != htons(ETH_P_8021Q) &&
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
4538
if (fsp->m_ext.vlan_tci == htons(0xFFFF))
drivers/net/ethernet/intel/i40e/i40e_main.c
3259
i40e_vlan_rx_add_vid_up(vsi->netdev, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/i40e/i40e_txrx.c
1866
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/intel/i40e/i40e_txrx.c
3008
if (protocol == htons(ETH_P_8021Q) &&
drivers/net/ethernet/intel/i40e/i40e_txrx.c
3026
} else if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/intel/i40e/i40e_txrx.c
3055
vhdr->h_vlan_TCI = htons(tx_flags >>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
4556
if (vlan_proto != htons(ETH_P_8021Q)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
148
pay_word[hdr_offs >> 1] = htons(fltr->flex_words[i].word);
drivers/net/ethernet/intel/iavf/iavf_fdir.c
403
if (fltr->ip_mask.src_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
408
if (fltr->ip_mask.dst_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
41
if (fltr->eth_mask.etype && fltr->eth_mask.etype != htons(U16_MAX))
drivers/net/ethernet/intel/iavf/iavf_fdir.c
432
if (fltr->ip_mask.src_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
437
if (fltr->ip_mask.dst_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
464
if (fltr->ip_mask.src_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
469
if (fltr->ip_mask.dst_port == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
574
if (fltr->eth_mask.etype == htons(U16_MAX)) {
drivers/net/ethernet/intel/iavf/iavf_fdir.c
575
if (fltr->eth_data.etype == htons(ETH_P_IP) ||
drivers/net/ethernet/intel/iavf/iavf_fdir.c
576
fltr->eth_data.etype == htons(ETH_P_IPV6))
drivers/net/ethernet/intel/iavf/iavf_fdir.c
75
if (fltr->ip_mask.src_port && fltr->ip_mask.src_port != htons(U16_MAX))
drivers/net/ethernet/intel/iavf/iavf_fdir.c
78
if (fltr->ip_mask.dst_port && fltr->ip_mask.dst_port != htons(U16_MAX))
drivers/net/ethernet/intel/iavf/iavf_main.c
4249
spec_h->h_proto = htons(ETH_P_IP);
drivers/net/ethernet/intel/iavf/iavf_main.c
4250
mask_h->h_proto = htons(0xFFFF);
drivers/net/ethernet/intel/iavf/iavf_txrx.c
2348
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/iavf/iavf_txrx.c
2350
else if (protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/intel/iavf/iavf_txrx.c
844
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/intel/iavf/iavf_txrx.c
847
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan_tag);
drivers/net/ethernet/intel/ice/ice_arfs.c
320
if (fk->basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/intel/ice/ice_arfs.c
368
if (l3_proto == htons(ETH_P_IP) && l4_proto == IPPROTO_UDP)
drivers/net/ethernet/intel/ice/ice_arfs.c
370
else if (l3_proto == htons(ETH_P_IP) && l4_proto == IPPROTO_TCP)
drivers/net/ethernet/intel/ice/ice_arfs.c
372
else if (l3_proto == htons(ETH_P_IPV6) && l4_proto == IPPROTO_UDP)
drivers/net/ethernet/intel/ice/ice_arfs.c
374
else if (l3_proto == htons(ETH_P_IPV6) && l4_proto == IPPROTO_TCP)
drivers/net/ethernet/intel/ice/ice_arfs.c
408
return n_proto == htons(ETH_P_IP) &&
drivers/net/ethernet/intel/ice/ice_arfs.c
468
if ((n_proto == htons(ETH_P_IP) && !ip_is_fragment(ip_hdr(skb))) ||
drivers/net/ethernet/intel/ice/ice_arfs.c
469
n_proto == htons(ETH_P_IPV6))
drivers/net/ethernet/intel/ice/ice_dcb.c
1126
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1167
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1196
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1266
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1284
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1319
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1347
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_dcb.c
1392
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_eswitch.c
251
if (unlikely(eth->h_proto == htons(ETH_P_LLDP)))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
1123
if (tcp_ip6_spec->psrc == htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
1133
if (tcp_ip6_spec->pdst == htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
1251
if (eth_spec->h_proto == htons(0xFFFF)) {
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
1298
if (ext_masks->vlan_etype != htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
1308
if (ext_masks->vlan_tci != htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
977
if (tcp_ip4_spec->psrc == htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
987
if (tcp_ip4_spec->pdst == htons(0xFFFF))
drivers/net/ethernet/intel/ice/ice_fdir.c
916
htons(tnl_port));
drivers/net/ethernet/intel/ice/ice_main.c
1007
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_main.c
6389
htons(vlan_ethertype) : 0);
drivers/net/ethernet/intel/ice/ice_main.c
968
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_main.c
988
tlv->typelen = htons(typelen);
drivers/net/ethernet/intel/ice/ice_switch.c
5618
htons(PPP_IPV6))
drivers/net/ethernet/intel/ice/ice_tc_lib.c
299
if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IP) &&
drivers/net/ethernet/intel/ice/ice_tc_lib.c
317
if (fltr->inner_headers.l2_key.n_proto == htons(ETH_P_IPV6) &&
drivers/net/ethernet/intel/ice/ice_tc_lib.c
554
if (headers->l2_key.n_proto == htons(ETH_P_IP) &&
drivers/net/ethernet/intel/ice/ice_tc_lib.c
573
if (headers->l2_key.n_proto == htons(ETH_P_IPV6) &&
drivers/net/ethernet/intel/ice/ice_tc_lib.c
767
return fltr->outer_headers.l2_key.n_proto == htons(ETH_P_LLDP);
drivers/net/ethernet/intel/ice/ice_tc_lib.c
869
list[2].h_u.ethertype.ethtype_id = htons(ETH_P_LLDP);
drivers/net/ethernet/intel/ice/ice_tc_lib.c
870
list[2].m_u.ethertype.ethtype_id = htons(0xFFFF);
drivers/net/ethernet/intel/ice/ice_txrx.c
2221
eth->h_proto == htons(ETH_P_LLDP)) &&
drivers/net/ethernet/intel/ice/ice_txrx.c
2290
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/ice/ice_txrx.c
2292
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
439
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
441
else if (protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/intel/idpf/idpf_txrx.c
2874
l4.udp->len = htons(shinfo->gso_size + sizeof(struct udphdr));
drivers/net/ethernet/intel/igb/igb_ethtool.c
2454
fsp->m_ext.vlan_tci = htons(VLAN_PRIO_MASK);
drivers/net/ethernet/intel/igb/igb_ethtool.c
2946
if (fsp->m_ext.vlan_tci != htons(VLAN_PRIO_MASK)) {
drivers/net/ethernet/intel/igb/igb_main.c
7617
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/intel/igb/igb_main.c
8925
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/igb/igb_main.c
9421
igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
drivers/net/ethernet/intel/igb/igb_main.c
9424
igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/igb/igb_ptp.c
1252
wr32(E1000_IMIR(3), (__force unsigned int)htons(PTP_EV_PORT));
drivers/net/ethernet/intel/igb/igb_ptp.c
1257
wr32(E1000_SPQF(3), (__force unsigned int)htons(PTP_EV_PORT));
drivers/net/ethernet/intel/igbvf/netdev.c
1274
igbvf_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/igbvf/netdev.c
2305
if (protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/igbvf/netdev.c
97
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/igc/igc_ethtool.c
1379
fsp->m_ext.vlan_tci != htons(VLAN_PRIO_MASK) &&
drivers/net/ethernet/intel/igc/igc_ethtool.c
981
fsp->h_u.ether_spec.h_proto = htons(rule->filter.etype);
drivers/net/ethernet/intel/igc/igc_ethtool.c
987
fsp->h_ext.vlan_etype = htons(rule->filter.vlan_etype);
drivers/net/ethernet/intel/igc/igc_ethtool.c
993
fsp->h_ext.vlan_tci = htons(rule->filter.vlan_tci);
drivers/net/ethernet/intel/igc/igc_ethtool.c
994
fsp->m_ext.vlan_tci = htons(rule->filter.vlan_tci_mask);
drivers/net/ethernet/intel/igc/igc_main.c
1833
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
403
if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
1100
if (first->protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
10212
if (protocol != htons(ETH_P_IP))
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
1908
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
5126
ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
5129
ixgbe_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9116
if ((first->protocol != htons(ETH_P_IP)) &&
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9117
(first->protocol != htons(ETH_P_IPV6)))
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9126
first->protocol == htons(ETH_P_IP) &&
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9186
vlan_id = htons(first->tx_flags >> IXGBE_TX_FLAGS_VLAN_SHIFT);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9202
common.port.src ^= th->dest ^ htons(ETH_P_8021Q);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9259
case htons(ETH_P_FCOE):
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9260
case htons(ETH_P_FIP):
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9404
} else if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9455
vhdr->h_vlan_TCI = htons(tx_flags >>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
9468
if ((protocol == htons(ETH_P_FCOE)) &&
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
1661
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/intel/ixgbevf/ipsec.c
499
if (first->protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
2092
htons(ETH_P_8021Q), vid);
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
3928
if (first->protocol == htons(ETH_P_IP))
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
522
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/jme.c
1029
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/jme.c
2048
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/jme.c
2073
case htons(ETH_P_IP):
drivers/net/ethernet/jme.c
2076
case htons(ETH_P_IPV6):
drivers/net/ethernet/jme.c
946
if (skb->protocol != htons(ETH_P_IP))
drivers/net/ethernet/marvell/mv643xx_eth.c
680
BUG_ON(skb->protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/marvell/mv643xx_eth.c
681
skb->protocol != htons(ETH_P_8021Q));
drivers/net/ethernet/marvell/mvneta.c
1796
if (l3_proto == htons(ETH_P_IP))
drivers/net/ethernet/marvell/mvneta.c
1962
if (l3_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/marvell/mvneta.c
1968
} else if (l3_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
2594
if (l3_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3613
if (l3_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
3619
} else if (l3_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
1207
npc_update_entry(rvu, NPC_PF_FUNC, entry, (__force u16)htons(target),
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2648
req->packet.vlan_tci = htons(vlan);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2649
req->mask.vlan_tci = htons(VLAN_VID_MASK);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
2731
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
616
flow_spec->vlan_itci = htons(vlan_tci);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
617
flow_mask->vlan_itci = htons(vlan_tci_mask);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
620
flow_spec->vlan_tci = htons(vlan_tci);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
621
flow_mask->vlan_tci = htons(vlan_tci_mask);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1057
if (udph->source == htons(PTP_PORT) &&
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1058
udph->dest == htons(PTP_PORT))
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1080
if (skb->vlan_proto == htons(ETH_P_8021AD)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1089
} else if (skb->vlan_proto == htons(ETH_P_8021Q)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
1146
origin_tstamp->seconds_msb = htons((ts.tv_sec >> 32) & 0xffff);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
728
htons(ext->lso_sb - skb_network_offset(skb));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
731
ipv6_hdr(skb)->payload_len = htons(tcp_hdrlen(skb));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
744
iplen = htons(ext->lso_sb - skb_network_offset(skb));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
745
if (l3_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
753
udph->len = htons(sizeof(struct udphdr));
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
761
if (skb->vlan_proto == htons(ETH_P_8021Q)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
765
} else if (skb->vlan_proto == htons(ETH_P_8021AD)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
828
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
834
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/marvell/prestera/prestera_acl.c
403
__be16 pcl_id_mask = htons(PRESTERA_ACL_KEYMASK_PCL_ID);
drivers/net/ethernet/marvell/prestera/prestera_acl.c
404
__be16 pcl_id_key = htons(pcl_id);
drivers/net/ethernet/marvell/prestera/prestera_flower.c
178
mask = htons(0x1FFF << 3);
drivers/net/ethernet/marvell/prestera/prestera_flower.c
179
key = htons(port->hw_id << 3);
drivers/net/ethernet/marvell/prestera/prestera_flower.c
183
mask = htons(0x3FF);
drivers/net/ethernet/marvell/prestera/prestera_flower.c
184
key = htons(port->dev_id);
drivers/net/ethernet/marvell/prestera/prestera_matchall.c
88
if (protocol != htons(ETH_P_ALL))
drivers/net/ethernet/marvell/prestera/prestera_rxtx.c
258
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tci);
drivers/net/ethernet/marvell/sky2.c
2690
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), be16_to_cpu(length));
drivers/net/ethernet/mediatek/mtk_eth_soc.c
1800
tcp_hdr(skb)->check = htons(skb_shinfo(skb)->gso_size);
drivers/net/ethernet/mediatek/mtk_ppe.c
787
case htons(ETH_P_XDSA):
drivers/net/ethernet/mediatek/mtk_ppe.c
800
case htons(ETH_P_8021Q):
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
155
*((__be16 *)&h_source[4]) = htons(l2->src_mac_lo);
drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
157
*((__be16 *)&h_dest[4]) = htons(l2->dest_mac_lo);
drivers/net/ethernet/mediatek/mtk_ppe_offload.c
376
act->vlan.proto != htons(ETH_P_8021Q))
drivers/net/ethernet/mellanox/mlx4/cmd.c
2011
if (vp_admin->vlan_proto != htons(ETH_P_8021AD) ||
drivers/net/ethernet/mellanox/mlx4/cmd.c
2030
vp_oper->state.vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/mellanox/mlx4/cmd.c
2421
admin_vport->vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/mellanox/mlx4/cmd.c
2422
oper_vport->vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/mellanox/mlx4/cmd.c
3017
if (proto == htons(ETH_P_8021AD) &&
drivers/net/ethernet/mellanox/mlx4/cmd.c
3021
if (proto != htons(ETH_P_8021Q) &&
drivers/net/ethernet/mellanox/mlx4/cmd.c
3022
proto != htons(ETH_P_8021AD))
drivers/net/ethernet/mellanox/mlx4/cmd.c
3025
if ((proto == htons(ETH_P_8021AD)) &&
drivers/net/ethernet/mellanox/mlx4/cmd.c
3034
if ((proto == htons(ETH_P_8021AD)) && (slave_state->active) &&
drivers/net/ethernet/mellanox/mlx4/cmd.c
3063
if ((proto == htons(ETH_P_8021AD) &&
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
381
if (skb->protocol != htons(ETH_P_IP))
drivers/net/ethernet/mellanox/mlx4/en_rx.c
913
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/mellanox/mlx4/en_rx.c
918
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD),
drivers/net/ethernet/mellanox/mlx4/en_selftest.c
70
ethh->h_proto = htons(ETH_P_ARP);
drivers/net/ethernet/mellanox/mlx4/fw.c
301
if ((vp_admin->vlan_proto != htons(ETH_P_8021AD)) ||
drivers/net/ethernet/mellanox/mlx4/fw.c
446
if (vp_oper->state.vlan_proto == htons(ETH_P_8021AD))
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
134
htons(MLX4_RATELIMIT_100M_UNITS);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
138
htons(MLX4_RATELIMIT_1G_UNITS);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
140
tc->max_bw_value = htons(r);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
142
tc->max_bw_value = htons(MLX4_RATELIMIT_DEFAULT);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
143
tc->max_bw_units = htons(MLX4_RATELIMIT_1G_UNITS);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
146
tc->pg = htons(pg[i]);
drivers/net/ethernet/mellanox/mlx4/fw_qos.c
147
tc->bw_precentage = htons(tc_tx_bw[i]);
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
5319
else if (work->vlan_proto == htons(ETH_P_8021AD))
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
5370
if (work->vlan_proto == htons(ETH_P_8021AD))
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
799
if (vp_oper->state.vlan_proto == htons(ETH_P_8021AD)) {
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
824
if (vp_oper->state.vlan_proto == htons(ETH_P_8021AD))
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
81
if (fk.basic.n_proto == htons(ETH_P_1588))
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
84
if (fk.basic.n_proto != htons(ETH_P_IP) &&
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
85
fk.basic.n_proto != htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.h
89
fk.ports.dst == htons(PTP_EV_PORT));
drivers/net/ethernet/mellanox/mlx5/core/en/selq.c
145
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/mellanox/mlx5/core/en/selq.c
147
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/mpls.c
18
act->mpls_push.proto != htons(ETH_P_MPLS_UC)) {
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/vlan.c
64
attr->vlan_proto[vlan_idx] = htons(ETH_P_8021Q);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
1433
case htons(ETH_P_IP):
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
1439
case htons(ETH_P_IPV6):
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
2513
if (basic.mask->n_proto != htons(0xFFFF) ||
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
2514
(basic.key->n_proto != htons(ETH_P_IP) && basic.key->n_proto != htons(ETH_P_IPV6)) ||
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
2525
(ports.mask->src != htons(0xFFFF) || ports.mask->dst != htons(0xFFFF))) {
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
211
vlan->h_vlan_TCI = htons(vlan_dev_vlan_id(dev));
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
212
vlan->h_vlan_encapsulated_proto = htons(proto);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
214
eth->h_proto = htons(proto);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
840
.n_proto = htons(0xFFFF),
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
876
key_basic.n_proto = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
901
key_basic.n_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_geneve.c
113
geneveh->proto_type = htons(ETH_P_TEB);
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_gre.c
46
greh->protocol = htons(ETH_P_TEB);
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
477
if (swp_spec->l3_proto == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
487
if (swp_spec->tun_l3_proto == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
491
if (swp_spec->l3_proto == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
268
*vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
66
case htons(ETH_P_IP):
drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
69
case htons(ETH_P_IPV6):
drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
83
swp_spec.tun_l3_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h
86
swp_spec.tun_l3_proto = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1783
eth_hdr->h_proto = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c
1786
eth_hdr->h_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
237
(skb->protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
238
skb->protocol != htons(ETH_P_IPV6))))
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
284
(skb->protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
285
skb->protocol != htons(ETH_P_IPV6)))) {
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
65
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
66
ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
69
ipv6hdr->payload_len = htons(ntohs(ipv6hdr->payload_len) -
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
94
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
153
if (unlikely(skb->protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
154
skb->protocol != htons(ETH_P_IPV6)))
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
194
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
44
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp_rxtx.c
88
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
500
if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_TCP)
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
502
if (etype == htons(ETH_P_IP) && ip_proto == IPPROTO_UDP)
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
504
if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_TCP)
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
506
if (etype == htons(ETH_P_IPV6) && ip_proto == IPPROTO_UDP)
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
564
if (tuple->etype == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
677
if (tuple->etype == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
704
if (tuple->etype == htons(ETH_P_IP))
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
707
if (tuple->etype == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
743
if (fk.basic.n_proto != htons(ETH_P_IP) &&
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
744
fk.basic.n_proto != htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
4864
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5004
case htons(ETH_P_IP):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5005
case htons(ETH_P_IPV6):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5006
case htons(ETH_P_TEB):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5008
case htons(ETH_P_MPLS_UC):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5009
case htons(ETH_P_MPLS_MC):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5025
case htons(ETH_P_IP):
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
5028
case htons(ETH_P_IPV6):
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1041
uh->len = htons(skb->len - udp_off);
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1060
uh->len = htons(skb->len - udp_off);
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1166
bool is_ipv4 = (rq->hw_gro_data->fk.basic.n_proto == htons(ETH_P_IP));
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1175
__be16 newlen = htons(skb->len - nhoff);
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1188
ipv6->payload_len = htons(skb->len - nhoff - sizeof(*ipv6));
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1213
if (*proto == htons(ETH_P_IP))
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1216
if (*proto == htons(ETH_P_IPV6))
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1233
rc = ((proto == htons(ETH_P_IP)) ? IP_ECN_set_ce((struct iphdr *)ip) :
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1243
return (proto == htons(ETH_P_IP)) ? ((struct iphdr *)ip_p)->protocol :
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1304
case htons(ETH_P_IP):
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1308
case htons(ETH_P_IPV6):
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
1446
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
2240
rq->hw_gro_data->fk.basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
995
if (proto == htons(ETH_P_IP)) {
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
111
ethh->h_proto = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
114
udph->source = htons(9);
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
115
udph->dest = htons(9); /* Discard Protocol */
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
116
udph->len = htons(sizeof(struct mlx5ehdr) + sizeof(struct udphdr));
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
126
iph->tot_len = htons(iplen);
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
143
skb->protocol = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
186
if (udph->dest != htons(9))
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
224
lbtp->pt.type = htons(ETH_P_IP);
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2223
if (opt->opt_class != htons(U16_MAX) ||
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2377
if (ip_version_cap && match->mask->n_proto == htons(0xFFFF) &&
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2378
(match->key->n_proto == htons(ETH_P_IP) ||
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2379
match->key->n_proto == htons(ETH_P_IPV6))) {
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2382
match->key->n_proto == htons(ETH_P_IP) ? 4 : 6);
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2815
if (match.key->vlan_tpid == htons(ETH_P_8021AD)) {
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
2873
if (match.key->vlan_tpid == htons(ETH_P_8021AD)) {
drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c
1031
} vlan_hdr = { htons(vlan_proto), htons(vlan->vid) };
drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c
616
sectag.ethertype = htons(ETH_P_MACSEC);
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
203
return vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
522
if (match.mask->flags & htons(0x0E00)) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_matchall.c
241
if (protocol != htons(ETH_P_ALL)) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c
2012
if (f->common.protocol != htons(ETH_P_ALL)) {
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
8750
upper_dev = __vlan_find_dev_deep_rcu(br_dev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
8831
upper_dev = __vlan_find_dev_deep_rcu(br_dev, htons(ETH_P_8021Q),
drivers/net/ethernet/micrel/ksz884x.c
4489
skb->protocol == htons(ETH_P_IPV6))) {
drivers/net/ethernet/micrel/ksz884x.c
4596
if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/micrel/ksz884x.c
4601
if (protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
543
if (skb->protocol == htons(ETH_P_IP) &&
drivers/net/ethernet/microchip/lan966x/lan966x_main.c
548
skb->protocol == htons(ETH_P_IPV6) &&
drivers/net/ethernet/microsoft/mana/mana_en.c
151
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/microsoft/mana/mana_en.c
159
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/microsoft/mana/mana_en.c
1984
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tci);
drivers/net/ethernet/microsoft/mana/mana_en.c
416
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/microsoft/mana/mana_en.c
418
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/mscc/ocelot_flower.c
801
*(__be16 *)filter->key.etype.etype.value = htons(proto);
drivers/net/ethernet/mscc/ocelot_flower.c
802
*(__be16 *)filter->key.etype.etype.mask = htons(0xffff);
drivers/net/ethernet/mscc/ocelot_net.c
271
if (f->common.protocol != htons(ETH_P_ALL))
drivers/net/ethernet/mscc/ocelot_ptp.c
317
*(__be16 *)trap->key.etype.etype.value = htons(ETH_P_1588);
drivers/net/ethernet/mscc/ocelot_ptp.c
318
*(__be16 *)trap->key.etype.etype.mask = htons(0xffff);
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
1297
veh->h_vlan_proto == htons(ETH_P_8021Q)) {
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
1304
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), ntohs(veh->h_vlan_TCI));
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
2828
req->pseudo_hdr_offset = htons(pseudo_hdr_offset);
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
2831
req->length = htons(seglen);
drivers/net/ethernet/natsemi/ns83820.c
1114
extsts |= (EXTSTS_VPKT | htons(tag));
drivers/net/ethernet/natsemi/ns83820.c
903
__vlan_hwaccel_put_tag(skb, htons(ETH_P_IPV6), tag);
drivers/net/ethernet/netronome/nfp/abm/cls.c
182
tos_off = proto == htons(ETH_P_IP) ? 16 : 20;
drivers/net/ethernet/netronome/nfp/abm/cls.c
244
if (cls_u32->common.protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/netronome/nfp/abm/cls.c
245
cls_u32->common.protocol != htons(ETH_P_IPV6)) {
drivers/net/ethernet/netronome/nfp/abm/cls.c
68
case htons(ETH_P_IP):
drivers/net/ethernet/netronome/nfp/abm/cls.c
71
case htons(ETH_P_IPV6):
drivers/net/ethernet/netronome/nfp/bpf/main.c
126
if (cls_bpf->common.protocol != htons(ETH_P_ALL)) {
drivers/net/ethernet/netronome/nfp/flower/action.c
297
case htons(IANA_VXLAN_UDP_PORT):
drivers/net/ethernet/netronome/nfp/flower/action.c
299
case htons(GENEVE_UDP_PORT):
drivers/net/ethernet/netronome/nfp/flower/action.c
507
set_tun->tun_proto = htons(ETH_P_TEB);
drivers/net/ethernet/netronome/nfp/flower/conntrack.c
280
is_v6 = match1.key->n_proto == htons(ETH_P_IPV6);
drivers/net/ethernet/netronome/nfp/flower/offload.c
183
case htons(IANA_VXLAN_UDP_PORT):
drivers/net/ethernet/netronome/nfp/flower/offload.c
201
case htons(GENEVE_UDP_PORT):
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
2135
case htons(ETH_P_IP):
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
2138
case htons(ETH_P_IPV6):
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
2146
skb->inner_protocol != htons(ETH_P_TEB) ||
drivers/net/ethernet/netronome/nfp/nfp_net_dp.c
461
__vlan_hwaccel_put_tag(skb, htons(tpid), tci);
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
1662
if (fs->h_u.ether_spec.h_proto == htons(ETH_P_IP) ||
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
1663
fs->h_u.ether_spec.h_proto == htons(ETH_P_IPV6)) {
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
1670
(fs->m_u.ether_spec.h_proto != htons(0xffff));
drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c
124
if (vlan_proto != htons(ETH_P_8021Q)) {
drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c
291
ivi->vlan_proto = htons(FIELD_GET(NFP_NET_VF_CFG_VLAN_PROT, vlan_tag));
drivers/net/ethernet/nvidia/forcedeth.c
2835
if (((struct vlan_ethhdr *)packet)->h_vlan_proto == htons(ETH_P_8021Q)) {
drivers/net/ethernet/nvidia/forcedeth.c
3045
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
1097
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/pensando/ionic/ionic_lif.c
2457
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/pensando/ionic/ionic_txrx.c
695
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
1615
if (skb->protocol == htons(ETH_P_8021Q))
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
1621
csum_replace2(&iph->check, iph->tot_len, htons(length));
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
1622
iph->tot_len = htons(length);
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
1930
vh->h_vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
1931
vh->h_vlan_TCI = htons(vid);
drivers/net/ethernet/qlogic/qed/qed_iwarp.c
1135
mpa_v2_params->ird = htons(mpa_ird);
drivers/net/ethernet/qlogic/qed/qed_iwarp.c
1136
mpa_v2_params->ord = htons(mpa_ord);
drivers/net/ethernet/qlogic/qed/qed_ll2.c
227
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/qlogic/qed/qed_ll2.c
2710
if (!((vlan_get_protocol(skb) == htons(ETH_P_IPV6)) &&
drivers/net/ethernet/qlogic/qede/qede_filter.c
1339
if (fltr->tuple.eth_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/qlogic/qede/qede_filter.c
1400
if (t->eth_proto == htons(ETH_P_IP))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1416
if (a->eth_proto != htons(ETH_P_IP) ||
drivers/net/ethernet/qlogic/qede/qede_filter.c
1417
b->eth_proto != htons(ETH_P_IP))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1458
if (a->eth_proto != htons(ETH_P_IPV6) ||
drivers/net/ethernet/qlogic/qede/qede_filter.c
1459
b->eth_proto != htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1708
if ((match.key->src && match.mask->src != htons(U16_MAX)) ||
drivers/net/ethernet/qlogic/qede/qede_filter.c
1709
(match.key->dst && match.mask->dst != htons(U16_MAX))) {
drivers/net/ethernet/qlogic/qede/qede_filter.c
1791
tuple->eth_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/qlogic/qede/qede_filter.c
1801
tuple->eth_proto = htons(ETH_P_IP);
drivers/net/ethernet/qlogic/qede/qede_filter.c
1811
tuple->eth_proto = htons(ETH_P_IPV6);
drivers/net/ethernet/qlogic/qede/qede_filter.c
1821
tuple->eth_proto = htons(ETH_P_IP);
drivers/net/ethernet/qlogic/qede/qede_filter.c
1851
if (proto != htons(ETH_P_IP) &&
drivers/net/ethernet/qlogic/qede/qede_filter.c
1852
proto != htons(ETH_P_IPV6)) {
drivers/net/ethernet/qlogic/qede/qede_filter.c
1865
if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IP))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1867
else if (ip_proto == IPPROTO_TCP && proto == htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1869
else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IP))
drivers/net/ethernet/qlogic/qede/qede_filter.c
1871
else if (ip_proto == IPPROTO_UDP && proto == htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qede/qede_filter.c
2006
proto = htons(ETH_P_IP);
drivers/net/ethernet/qlogic/qede/qede_filter.c
2010
proto = htons(ETH_P_IPV6);
drivers/net/ethernet/qlogic/qede/qede_filter.c
369
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qlogic/qede/qede_filter.c
445
if (skb->protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/qlogic/qede/qede_filter.c
446
skb->protocol != htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qede/qede_filter.c
449
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qlogic/qede/qede_filter.c
502
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qlogic/qede/qede_fp.c
1769
case htons(ETH_P_IP):
drivers/net/ethernet/qlogic/qede/qede_fp.c
1772
case htons(ETH_P_IPV6):
drivers/net/ethernet/qlogic/qede/qede_fp.c
186
if (l3_proto == htons(ETH_P_IPV6) &&
drivers/net/ethernet/qlogic/qede/qede_fp.c
226
if (vlan_get_protocol(skb) == htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qede/qede_fp.c
644
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
drivers/net/ethernet/qlogic/qede/qede_fp.c
939
case htons(ETH_P_IP):
drivers/net/ethernet/qlogic/qede/qede_fp.c
942
case htons(ETH_P_IPV6):
drivers/net/ethernet/qlogic/qede/qede_main.c
128
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1246
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1325
ipv6h->payload_len = htons(length);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1330
csum_replace2(&iph->check, iph->tot_len, htons(length));
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1331
iph->tot_len = htons(length);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1340
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1347
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1771
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1847
ipv6h->payload_len = htons(length);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1852
csum_replace2(&iph->check, iph->tot_len, htons(length));
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1853
iph->tot_len = htons(length);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1862
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
1869
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
527
vh->h_vlan_proto = htons(ETH_P_8021Q);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
528
vh->h_vlan_TCI = htons(vlan_tci);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
4092
dev = __vlan_find_dev_deep_rcu(netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
1926
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/qualcomm/emac/emac-mac.c
1080
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
drivers/net/ethernet/qualcomm/emac/emac-mac.c
1260
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
178
skb->protocol = htons(ETH_P_MAP);
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
26
skb->protocol = htons(ETH_P_IP);
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
29
skb->protocol = htons(ETH_P_IPV6);
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
32
skb->protocol = htons(ETH_P_MAP);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
61
skb->protocol = htons(ETH_P_MAP);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
192
ul_header->csum_start_offset = htons(skb_network_header_len(skb));
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
193
ul_header->csum_info = htons(val);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
227
ul_header->csum_start_offset = htons(skb_network_header_len(skb));
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
228
ul_header->csum_info = htons(val);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
261
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
267
skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
313
map_header->pkt_len = htons(map_datalen);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
329
map_header->pkt_len = htons(map_datalen + padding);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
420
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
423
if (IS_ENABLED(CONFIG_IPV6) && skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
451
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
457
if (IS_ENABLED(CONFIG_IPV6) && skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
617
port->skbagg_head->protocol = htons(ETH_P_MAP);
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
671
skb->protocol = htons(ETH_P_MAP);
drivers/net/ethernet/realtek/8139cp.c
429
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
drivers/net/ethernet/realtek/r8169_main.c
1870
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
drivers/net/ethernet/realtek/r8169_main.c
4384
case htons(ETH_P_IP):
drivers/net/ethernet/realtek/r8169_main.c
4387
case htons(ETH_P_IPV6):
drivers/net/ethernet/realtek/r8169_main.c
4494
case htons(ETH_P_IP):
drivers/net/ethernet/realtek/r8169_main.c
4499
case htons(ETH_P_IPV6):
drivers/net/ethernet/realtek/r8169_main.c
4640
if (vlan_get_protocol(skb) == htons(ETH_P_IP) &&
drivers/net/ethernet/realtek/rtase/rtase_main.c
1224
case htons(ETH_P_IP):
drivers/net/ethernet/realtek/rtase/rtase_main.c
1229
case htons(ETH_P_IPV6):
drivers/net/ethernet/realtek/rtase/rtase_main.c
474
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/rocker/rocker_ofdpa.c
1266
__be16 eth_type = htons(ETH_P_IP);
drivers/net/ethernet/rocker/rocker_ofdpa.c
1562
.eth_type = htons(ETH_P_ARP),
drivers/net/ethernet/rocker/rocker_ofdpa.c
1569
.eth_type = htons(ETH_P_IP),
drivers/net/ethernet/rocker/rocker_ofdpa.c
1577
.eth_type = htons(ETH_P_IPV6),
drivers/net/ethernet/rocker/rocker_ofdpa.c
1602
__be16 vlan_id_mask = htons(0xffff);
drivers/net/ethernet/rocker/rocker_ofdpa.c
1654
__be16 vlan_id_mask = htons(0xffff);
drivers/net/ethernet/rocker/rocker_ofdpa.c
1717
ctrl, htons(vid));
drivers/net/ethernet/rocker/rocker_ofdpa.c
1731
__be16 vlan_id = htons(vid);
drivers/net/ethernet/rocker/rocker_ofdpa.c
1732
__be16 vlan_id_mask = htons(0xffff);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2024
__be16 vlan_id_mask = htons(0xffff);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2031
eth_type = htons(ETH_P_IP);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2040
eth_type = htons(ETH_P_IPV6);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2073
vlan_id = htons(vid);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2190
err = ofdpa_port_router_mac(ofdpa_port, 0, htons(vid));
drivers/net/ethernet/rocker/rocker_ofdpa.c
2204
htons(vid));
drivers/net/ethernet/rocker/rocker_ofdpa.c
2255
found->vlan_id = htons(OFDPA_INTERNAL_VLAN_ID_BASE + i);
drivers/net/ethernet/rocker/rocker_ofdpa.c
2273
__be16 eth_type = htons(ETH_P_IP);
drivers/net/ethernet/rocker/rocker_ofdpa.c
254
vlan_id = htons(vid);
drivers/net/ethernet/seeq/ether3.c
522
ether3_writeword(dev, htons(next_ptr));
drivers/net/ethernet/seeq/ether3.c
525
ether3_writeword(dev, htons((ptr + length + 4)));
drivers/net/ethernet/sfc/ef10.c
2285
ip->tot_len = htons(ip_tot_len);
drivers/net/ethernet/sfc/ef10.c
2289
((struct ipv6hdr *)ip)->payload_len = htons(ip_tot_len);
drivers/net/ethernet/sfc/ef10.c
3770
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/sfc/ef10.c
3778
if (proto != htons(ETH_P_8021Q))
drivers/net/ethernet/sfc/efx_common.c
1286
case htons(ETH_P_IP):
drivers/net/ethernet/sfc/efx_common.c
1289
case htons(ETH_P_IPV6):
drivers/net/ethernet/sfc/ethtool_common.c
1035
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/ethtool_common.c
1060
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/ethtool_common.c
1111
if (rule->m_ext.vlan_tci != htons(0xfff))
drivers/net/ethernet/sfc/ethtool_common.c
665
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/ethtool_common.c
692
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/ethtool_common.c
743
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/ethtool_common.c
763
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/ethtool_common.c
792
rule->m_ext.vlan_tci = htons(0xfff);
drivers/net/ethernet/sfc/ethtool_common.c
964
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/ethtool_common.c
999
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/falcon/ethtool.c
1074
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/ethtool.c
1109
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/falcon/ethtool.c
1145
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/ethtool.c
1170
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/falcon/ethtool.c
1221
if (rule->m_ext.vlan_tci != htons(0xfff))
drivers/net/ethernet/sfc/falcon/ethtool.c
813
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/falcon/ethtool.c
840
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/falcon/ethtool.c
891
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/falcon/ethtool.c
911
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/falcon/ethtool.c
940
rule->m_ext.vlan_tci = htons(0xfff);
drivers/net/ethernet/sfc/falcon/farch.c
1967
if (gen_spec->ether_type != htons(ETH_P_IP))
drivers/net/ethernet/sfc/falcon/farch.c
2070
gen_spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/farch.c
2077
port1 = htons(spec->data[0]);
drivers/net/ethernet/sfc/falcon/farch.c
2079
port2 = htons(spec->data[1] >> 16);
drivers/net/ethernet/sfc/falcon/farch.c
2112
gen_spec->outer_vid = htons(spec->data[0]);
drivers/net/ethernet/sfc/falcon/filter.h
187
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/filter.h
212
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/filter.h
239
spec->outer_vid = htons(vid);
drivers/net/ethernet/sfc/falcon/rx.c
856
if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6))
drivers/net/ethernet/sfc/falcon/rx.c
871
if (fk.basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/falcon/rx.c
891
if (spec.ether_type == htons(ETH_P_IP))
drivers/net/ethernet/sfc/falcon/rx.c
969
if (spec->ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/falcon/rx.c
972
if (spec->ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/falcon/selftest.c
391
payload->header.h_proto = htons(ETH_P_IP);
drivers/net/ethernet/sfc/falcon/selftest.c
396
payload->ip.check = (__force __sum16) htons(0xdead);
drivers/net/ethernet/sfc/falcon/selftest.c
397
payload->ip.tot_len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/falcon/selftest.c
404
payload->udp.len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/falcon/selftest.c
409
payload->iteration = htons(ntohs(payload->iteration) + 1);
drivers/net/ethernet/sfc/filter.h
213
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/filter.h
234
spec->ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/filter.h
259
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/filter.h
286
spec->outer_vid = htons(vid);
drivers/net/ethernet/sfc/mae.c
1496
htons(ETH_P_IP));
drivers/net/ethernet/sfc/mae.c
1508
htons(ETH_P_IPV6));
drivers/net/ethernet/sfc/mae.c
1930
bool ipv6 = conn->eth_proto == htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/mae.c
1962
bool ipv6 = conn->eth_proto == htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/mcdi_filters.c
135
htons(encap_type & EFX_ENCAP_FLAG_IPV6 ?
drivers/net/ethernet/sfc/mcdi_filters.c
72
if (spec->ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/mcdi_filters.c
75
if (spec->ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/ptp.c
1299
efx_filter_set_ipv4_local(&spec, IPPROTO_UDP, addr, htons(port));
drivers/net/ethernet/sfc/ptp.c
1311
efx_filter_set_ipv6_local(&spec, IPPROTO_UDP, addr, htons(port));
drivers/net/ethernet/sfc/ptp.c
1323
spec.ether_type = htons(ETH_P_1588);
drivers/net/ethernet/sfc/ptp.c
1380
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/ptp.c
1383
udp_hdr(skb)->source == htons(PTP_EVENT_PORT);
drivers/net/ethernet/sfc/ptp.c
1384
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/sfc/ptp.c
1387
udp_hdr(skb)->source == htons(PTP_EVENT_PORT);
drivers/net/ethernet/sfc/ptp.c
1404
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/ptp.c
1722
likely(skb->protocol == htons(ETH_P_IP)) &&
drivers/net/ethernet/sfc/ptp.c
1728
udp_hdr(skb)->dest == htons(PTP_EVENT_PORT);
drivers/net/ethernet/sfc/ptp.c
1795
if ((udp_hdr(skb)->dest == htons(PTP_EVENT_PORT)) &&
drivers/net/ethernet/sfc/rx_common.c
602
if (spec->ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/rx_common.c
605
if (spec->ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/rx_common.c
855
if (req->spec.ether_type == htons(ETH_P_IP))
drivers/net/ethernet/sfc/rx_common.c
871
if (req->spec.ether_type == htons(ETH_P_IP))
drivers/net/ethernet/sfc/rx_common.c
926
if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) {
drivers/net/ethernet/sfc/rx_common.c
946
if (fk.basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/selftest.c
388
payload->header.h_proto = htons(ETH_P_IP);
drivers/net/ethernet/sfc/selftest.c
393
payload->ip.check = (__force __sum16) htons(0xdead);
drivers/net/ethernet/sfc/selftest.c
394
payload->ip.tot_len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/selftest.c
401
payload->udp.len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/selftest.c
406
payload->iteration = htons(ntohs(payload->iteration) + 1);
drivers/net/ethernet/sfc/siena/efx_common.c
1313
case htons(ETH_P_IP):
drivers/net/ethernet/sfc/siena/efx_common.c
1316
case htons(ETH_P_IPV6):
drivers/net/ethernet/sfc/siena/ethtool_common.c
1026
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/ethtool_common.c
1051
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/siena/ethtool_common.c
1102
if (rule->m_ext.vlan_tci != htons(0xfff))
drivers/net/ethernet/sfc/siena/ethtool_common.c
666
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/siena/ethtool_common.c
693
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/siena/ethtool_common.c
744
spec.ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/siena/ethtool_common.c
764
spec.ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/siena/ethtool_common.c
793
rule->m_ext.vlan_tci = htons(0xfff);
drivers/net/ethernet/sfc/siena/ethtool_common.c
955
spec.ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/ethtool_common.c
990
spec.ether_type = htons(ETH_P_IPV6);
drivers/net/ethernet/sfc/siena/farch.c
2058
if (gen_spec->ether_type != htons(ETH_P_IP))
drivers/net/ethernet/sfc/siena/farch.c
2161
gen_spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/farch.c
2168
port1 = htons(spec->data[0]);
drivers/net/ethernet/sfc/siena/farch.c
2170
port2 = htons(spec->data[1] >> 16);
drivers/net/ethernet/sfc/siena/farch.c
2203
gen_spec->outer_vid = htons(spec->data[0]);
drivers/net/ethernet/sfc/siena/filter.h
213
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/filter.h
238
spec->ether_type = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/filter.h
265
spec->outer_vid = htons(vid);
drivers/net/ethernet/sfc/siena/ptp.c
1290
htons(PTP_EVENT_PORT));
drivers/net/ethernet/sfc/siena/ptp.c
1304
htons(PTP_GENERAL_PORT));
drivers/net/ethernet/sfc/siena/ptp.c
1603
likely(skb->protocol == htons(ETH_P_IP)) &&
drivers/net/ethernet/sfc/siena/ptp.c
1609
udp_hdr(skb)->dest == htons(PTP_EVENT_PORT);
drivers/net/ethernet/sfc/siena/ptp.c
1709
if ((udp_hdr(skb)->dest == htons(PTP_EVENT_PORT)) &&
drivers/net/ethernet/sfc/siena/rx_common.c
589
if (spec->ether_type == htons(ETH_P_IP) &&
drivers/net/ethernet/sfc/siena/rx_common.c
592
if (spec->ether_type == htons(ETH_P_IPV6) &&
drivers/net/ethernet/sfc/siena/rx_common.c
845
if (req->spec.ether_type == htons(ETH_P_IP))
drivers/net/ethernet/sfc/siena/rx_common.c
861
if (req->spec.ether_type == htons(ETH_P_IP))
drivers/net/ethernet/sfc/siena/rx_common.c
917
if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) {
drivers/net/ethernet/sfc/siena/rx_common.c
937
if (fk.basic.n_proto == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/siena/selftest.c
389
payload->header.h_proto = htons(ETH_P_IP);
drivers/net/ethernet/sfc/siena/selftest.c
394
payload->ip.check = (__force __sum16) htons(0xdead);
drivers/net/ethernet/sfc/siena/selftest.c
395
payload->ip.tot_len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/siena/selftest.c
402
payload->udp.len = htons(sizeof(*payload) -
drivers/net/ethernet/sfc/siena/selftest.c
407
payload->iteration = htons(ntohs(payload->iteration) + 1);
drivers/net/ethernet/sfc/siena/siena_sriov.c
1624
vf->addr.tci = htons(tci);
drivers/net/ethernet/sfc/siena/sriov.h
36
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/sfc/sriov.c
31
if (vlan_proto != htons(ETH_P_8021Q))
drivers/net/ethernet/sfc/tc.c
307
!(match->value.eth_proto == htons(ETH_P_IP) ||
drivers/net/ethernet/sfc/tc.c
308
match->value.eth_proto == htons(ETH_P_IPV6)))
drivers/net/ethernet/sfc/tc_conntrack.c
148
if (conn->eth_proto != (ipv == 4 ? htons(ETH_P_IP)
drivers/net/ethernet/sfc/tc_conntrack.c
149
: htons(ETH_P_IPV6))) {
drivers/net/ethernet/sfc/tc_conntrack.c
332
conn->l4_natport = htons(fa->mangle.val);
drivers/net/ethernet/sfc/tc_conntrack.c
404
if (conn->eth_proto != htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/tc_encap_actions.c
264
eth->h_proto = htons(proto);
drivers/net/ethernet/sfc/tc_encap_actions.c
339
geneve->proto_type = htons(ETH_P_TEB);
drivers/net/ethernet/sfc/tx_tso.c
149
if (protocol == htons(ETH_P_8021Q)) {
drivers/net/ethernet/sfc/tx_tso.c
155
if (protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sfc/tx_tso.c
158
EFX_WARN_ON_ONCE_PARANOID(protocol != htons(ETH_P_IPV6));
drivers/net/ethernet/sfc/tx_tso.c
183
if (st->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sgi/ioc3-eth.c
319
if (eh->h_proto != htons(ETH_P_IP))
drivers/net/ethernet/sgi/ioc3-eth.c
333
htons((u16)ih->protocol) +
drivers/net/ethernet/socionext/netsec.c
1165
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
4634
(proto == htons(ETH_P_IP) || proto == htons(ETH_P_IPV6));
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
4918
if ((vlan_proto == htons(ETH_P_8021Q) &&
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
4920
(vlan_proto == htons(ETH_P_8021AD) &&
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1002
tpriv->pt.type = htons(ETH_P_8021Q);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1016
ret = vlan_vid_add(priv->dev, htons(ETH_P_8021AD), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1052
vlan_vid_del(priv->dev, htons(ETH_P_8021AD), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1122
cls_u32.common.protocol = htons(ETH_P_ALL);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
119
ehdr->h_proto = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
124
ptr[3] = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1279
tpriv->pt.type = svlan ? htons(ETH_P_8021Q) : htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1287
ret = vlan_vid_add(priv->dev, htons(proto), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1299
__vlan_hwaccel_put_tag(skb, htons(proto), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1300
skb->protocol = htons(proto);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1310
vlan_vid_del(priv->dev, htons(proto), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
138
proto[0] = htons(ETH_P_8021Q);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
139
tag[0] = htons(attr->vlan_id_out);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
140
tag[1] = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
142
proto[0] = htons(ETH_P_8021AD);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
143
tag[1] = htons(ETH_P_8021Q);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
144
tag[2] = htons(attr->vlan_id_in);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
145
tag[3] = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
150
thdr->source = htons(attr->sport);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
151
thdr->dest = htons(attr->dport);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1510
keys.key.src = htons(src);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1511
keys.key.dst = htons(dst);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
155
uhdr->source = htons(attr->sport);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
156
uhdr->dest = htons(attr->dport);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
157
uhdr->len = htons(sizeof(*shdr) + sizeof(*uhdr) + attr->size);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
159
uhdr->len = htons(attr->max_size -
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1607
if (ahdr->ar_op != htons(ARPOP_REPLY))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
1638
tpriv->pt.type = htons(ETH_P_ARP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
180
ihdr->tot_len = htons(iplen);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
209
skb->protocol = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
291
if (thdr->dest != htons(tpriv->packet->dport))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
300
if (uhdr->dest != htons(tpriv->packet->dport))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
334
tpriv->pt.type = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
725
if (ehdr->h_proto != htons(ETH_P_PAUSE))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
753
tpriv->pt.type = htons(ETH_P_PAUSE);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
858
if (skb->vlan_proto != htons(proto))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
879
if (uhdr->dest != htons(tpriv->packet->dport))
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
908
tpriv->pt.type = htons(ETH_P_IP);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
922
ret = vlan_vid_add(priv->dev, htons(ETH_P_8021Q), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
958
vlan_vid_del(priv->dev, htons(ETH_P_8021Q), tpriv->vlan_id);
drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c
230
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/sun/cassini.c
2086
csum = (__force __sum16)htons(CAS_VAL(RX_COMP4_TCP_CSUM, words[3]));
drivers/net/ethernet/sun/cassini.c
2093
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sun/sungem.c
849
csum = (__force __sum16)htons((status & RXDCTRL_TCPCSUM) ^ 0xffff);
drivers/net/ethernet/sun/sunhme.c
1845
skb->csum = csum_unfold(~(__force __sum16)htons(csum));
drivers/net/ethernet/sun/sunvnet_common.c
1175
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sun/sunvnet_common.c
1186
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/sun/sunvnet_common.c
1234
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/sun/sunvnet_common.c
1236
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/sun/sunvnet_common.c
1354
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/sun/sunvnet_common.c
1358
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/sun/sunvnet_common.c
1370
if (skb->protocol == htons(ETH_P_IP))
drivers/net/ethernet/sun/sunvnet_common.c
1373
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ethernet/sun/sunvnet_common.c
313
if (skb->protocol != htons(ETH_P_IP))
drivers/net/ethernet/sun/sunvnet_common.c
346
if (skb->protocol != htons(ETH_P_IPV6))
drivers/net/ethernet/sun/sunvnet_common.c
429
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/sun/sunvnet_common.c
436
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c
1223
(skb->protocol == htons(ETH_P_8021Q)))
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c
1245
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/tehuti/tehuti.c
1136
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), GET_RXD_VLAN_TCI(rxd_vlan));
drivers/net/ethernet/tehuti/tn40.c
393
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ethernet/ti/cpsw_priv.c
262
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vtag);
drivers/net/ethernet/toshiba/ps3_gelic_net.c
725
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/ethernet/toshiba/ps3_gelic_net.c
766
veth->h_vlan_TCI = htons(tag);
drivers/net/ethernet/via/via-rhine.c
2030
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tci);
drivers/net/ethernet/via/via-velocity.c
2087
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/via/via-velocity.c
3044
arp->type = htons(ETH_P_ARP);
drivers/net/ethernet/via/via-velocity.c
3045
arp->ar_op = htons(1);
drivers/net/ethernet/wangxun/libwx/wx_hw.c
2040
wx_vlan_rx_add_vid(wx->netdev, htons(ETH_P_8021Q), 0);
drivers/net/ethernet/wangxun/libwx/wx_hw.c
2043
wx_vlan_rx_add_vid(wx->netdev, htons(ETH_P_8021Q), vid);
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1209
case htons(ETH_P_IP):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1213
case htons(ETH_P_IPV6):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1231
skb->inner_protocol != htons(ETH_P_TEB)) {
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1235
== htons(ETH_P_8021Q))
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1243
if (skb->inner_protocol == htons(ETH_P_IP) ||
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1244
skb->inner_protocol == htons(ETH_P_IPV6)) {
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1248
== htons(ETH_P_8021Q))
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1274
case htons(ETH_P_IP):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1278
case htons(ETH_P_IPV6):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1377
case htons(ETH_P_IP):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1381
case htons(ETH_P_IPV6):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1426
if (skb->vlan_proto == htons(ETH_P_8021AD) &&
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1473
case htons(ETH_P_IP):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1476
case htons(ETH_P_IPV6):
drivers/net/ethernet/wangxun/libwx/wx_lib.c
1564
if (skb->vlan_proto == htons(ETH_P_8021AD) &&
drivers/net/ethernet/wangxun/libwx/wx_lib.c
3240
skb->inner_protocol != htons(ETH_P_IP) &&
drivers/net/ethernet/wangxun/libwx/wx_lib.c
3241
skb->inner_protocol != htons(ETH_P_IPV6) &&
drivers/net/ethernet/wangxun/libwx/wx_lib.c
3242
skb->inner_protocol != htons(ETH_P_TEB))
drivers/net/ethernet/wangxun/libwx/wx_lib.c
591
__vlan_hwaccel_put_tag(skb, htons(ethertype),
drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
452
input->filter.formatted.vlan_id = htons(ptype);
drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
454
mask.formatted.vlan_id = htons(0xFFFF);
drivers/net/ethernet/wangxun/txgbe/txgbe_ethtool.c
456
mask.formatted.vlan_id = htons(0xFFF8);
drivers/net/ethernet/wangxun/txgbe/txgbe_fdir.c
274
input.formatted.vlan_id = htons((u16)ptype);
drivers/net/ethernet/xilinx/ll_temac_main.c
1012
(skb->protocol == htons(ETH_P_IP)) &&
drivers/net/ethernet/xilinx/ll_temac_main.c
1019
skb->csum = htons(be32_to_cpu(bd->app3) & 0xFFFF);
drivers/net/ethernet/xscale/ixp4xx_eth.c
335
if (!ixp_ptp_match(skb, htons(uid), htonl(lo), htons(seq)))
drivers/net/geneve.c
116
static const __be16 proto_id_map[] = { htons(ETH_P_TEB),
drivers/net/geneve.c
117
htons(ETH_P_IPV6),
drivers/net/geneve.c
118
htons(ETH_P_IP) };
drivers/net/geneve.c
1188
nested_is_v6 = skb->protocol == htons(ETH_P_IPV6);
drivers/net/geneve.c
1205
hint->nested_is_v6 = skb->protocol == htons(ETH_P_IPV6);
drivers/net/geneve.c
1224
gro_opt->opt_class = htons(GENEVE_OPT_NETDEV_CLASS);
drivers/net/geneve.c
1261
inner_proto = inner_proto_inherit ? skb->protocol : htons(ETH_P_TEB);
drivers/net/geneve.c
1365
htons(IP_DF) : 0;
drivers/net/geneve.c
1374
df = htons(IP_DF);
drivers/net/geneve.c
1379
df = htons(IP_DF);
drivers/net/geneve.c
1383
if (iph->frag_off & htons(IP_DF))
drivers/net/geneve.c
1384
df = htons(IP_DF);
drivers/net/geneve.c
1895
info->key.tp_dst = htons(dst_port);
drivers/net/geneve.c
2282
.low = htons(geneve->cfg.port_min),
drivers/net/geneve.c
2283
.high = htons(geneve->cfg.port_max),
drivers/net/geneve.c
303
if (gnvh->proto_type == htons(ETH_P_TEB)) {
drivers/net/geneve.c
424
if (opt->opt_class == htons(GENEVE_OPT_NETDEV_CLASS) &&
drivers/net/geneve.c
621
ipv6h->payload_len = htons(total_len - sizeof(*ipv6h));
drivers/net/geneve.c
625
iph->tot_len = htons(total_len);
drivers/net/geneve.c
634
uh->len = htons(skb->len - gro_hint->nested_tp_offset);
drivers/net/geneve.c
679
inner_proto != htons(ETH_P_TEB)))) {
drivers/net/geneve.c
726
if (geneveh->proto_type != htons(ETH_P_TEB))
drivers/net/geneve.c
930
if (likely(type == htons(ETH_P_TEB)))
drivers/net/geneve.c
961
if (likely(type == htons(ETH_P_TEB)))
drivers/net/gtp.c
1009
pktinfo->gtph_port = htons(GTP0_PORT);
drivers/net/gtp.c
1013
pktinfo->gtph_port = htons(GTP1U_PORT);
drivers/net/gtp.c
1092
if (frag_off & htons(IP_DF) &&
drivers/net/gtp.c
1422
udp_conf.local_udp_port = htons(GTP0_PORT);
drivers/net/gtp.c
1424
udp_conf.local_udp_port = htons(GTP1U_PORT);
drivers/net/gtp.c
2368
port = htons(GTP0_PORT);
drivers/net/gtp.c
2385
port = htons(GTP1U_PORT);
drivers/net/gtp.c
321
if (iptunnel_pull_header(skb, hdrlen, htons(inner_proto),
drivers/net/gtp.c
421
hdr->length = htons(len_pkt - len_hdr);
drivers/net/gtp.c
447
htons(GTP0_PORT), htons(GTP0_PORT),
drivers/net/gtp.c
644
hdr->length = htons(len_pkt - len_hdr);
drivers/net/gtp.c
650
hdr->length = htons(len_pkt - len_hdr);
drivers/net/gtp.c
706
htons(GTP1U_PORT), htons(GTP1U_PORT),
drivers/net/gtp.c
958
gtp0->length = htons(payload_len);
drivers/net/gtp.c
959
gtp0->seq = htons((atomic_inc_return(&pctx->tx_seq) - 1) % 0xffff);
drivers/net/gtp.c
960
gtp0->flow = htons(pctx->u.v0.flow);
drivers/net/gtp.c
981
gtp1->length = htons(payload_len);
drivers/net/hamradio/6pack.c
238
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/baycom_epp.c
759
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/bpqether.c
225
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/hdlcdrv.c
395
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/mkiss.c
524
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/scc.c
1645
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hamradio/yam.c
585
if (skb->protocol == htons(ETH_P_IP))
drivers/net/hyperv/hyperv_net.h
1098
if (flow.basic.n_proto == htons(ETH_P_IP))
drivers/net/hyperv/hyperv_net.h
1100
else if (flow.basic.n_proto == htons(ETH_P_IPV6))
drivers/net/hyperv/hyperv_net.h
1106
if (flow.basic.n_proto == htons(ETH_P_IP))
drivers/net/hyperv/hyperv_net.h
1108
else if (flow.basic.n_proto == htons(ETH_P_IPV6))
drivers/net/hyperv/hyperv_net.h
1117
if (flow.basic.n_proto == htons(ETH_P_IP))
drivers/net/hyperv/hyperv_net.h
1119
else if (flow.basic.n_proto == htons(ETH_P_IPV6))
drivers/net/hyperv/netvsc_drv.c
396
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/hyperv/netvsc_drv.c
533
if (skb->protocol == htons(ETH_P_8021Q)) {
drivers/net/hyperv/netvsc_drv.c
543
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tci);
drivers/net/hyperv/netvsc_drv.c
574
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/hyperv/netvsc_drv.c
600
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/hyperv/netvsc_drv.c
807
skb->protocol == htons(ETH_P_IP)) {
drivers/net/hyperv/netvsc_drv.c
830
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/ipa/ipa_modem.c
135
if (endpoint->config.qmap && skb->protocol != htons(ETH_P_MAP))
drivers/net/ipa/ipa_modem.c
202
skb->protocol = htons(ETH_P_MAP);
drivers/net/ipvlan/ipvlan_core.c
154
case htons(ETH_P_ARP): {
drivers/net/ipvlan/ipvlan_core.c
165
case htons(ETH_P_IP): {
drivers/net/ipvlan/ipvlan_core.c
184
case htons(ETH_P_IPV6): {
drivers/net/ipvlan/ipvlan_core.c
562
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ipvlan/ipvlan_core.c
564
else if (skb->protocol == htons(ETH_P_IP))
drivers/net/ipvlan/ipvlan_core.c
578
if (skb->protocol == htons(ETH_P_PAUSE)) {
drivers/net/macsec.c
1148
if (hdr->eth.h_proto != htons(ETH_P_MACSEC))
drivers/net/macsec.c
310
h->eth.h_proto = htons(ETH_P_MACSEC);
drivers/net/macvlan.c
276
if (skb->protocol == htons(ETH_P_PAUSE))
drivers/net/mctp/mctp-i2c.c
323
skb->protocol = htons(ETH_P_MCTP);
drivers/net/mctp/mctp-i3c.c
118
skb->protocol = htons(ETH_P_MCTP);
drivers/net/mctp/mctp-serial.c
286
skb->protocol = htons(ETH_P_MCTP);
drivers/net/mctp/mctp-usb.c
231
skb->protocol = htons(ETH_P_MCTP);
drivers/net/mhi_net.c
214
skb->protocol = htons(ETH_P_IP);
drivers/net/mhi_net.c
217
skb->protocol = htons(ETH_P_IPV6);
drivers/net/mhi_net.c
220
skb->protocol = htons(ETH_P_MAP);
drivers/net/netdevsim/bpf.c
135
if (cls_bpf->common.protocol != htons(ETH_P_ALL)) {
drivers/net/netdevsim/dev.c
828
eth->h_proto = htons(ETH_P_IP);
drivers/net/netdevsim/dev.c
829
skb->protocol = htons(ETH_P_IP);
drivers/net/netdevsim/dev.c
839
iph->tot_len = htons(tot_len);
drivers/net/netdevsim/dev.c
848
udph->len = htons(sizeof(struct udphdr) + data_len);
drivers/net/netdevsim/psample.c
55
eth->h_proto = htons(ETH_P_IP);
drivers/net/netdevsim/psample.c
56
skb->protocol = htons(ETH_P_IP);
drivers/net/netdevsim/psample.c
66
iph->tot_len = htons(tot_len);
drivers/net/netdevsim/psample.c
76
udph->len = htons(sizeof(struct udphdr) + data_len);
drivers/net/netdevsim/psp.c
104
case htons(ETH_P_IPV6):
drivers/net/netdevsim/psp.c
98
case htons(ETH_P_IP):
drivers/net/ovpn/bind.h
70
case htons(ETH_P_IP):
drivers/net/ovpn/bind.h
80
case htons(ETH_P_IPV6):
drivers/net/ovpn/io.c
183
if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/ovpn/io.c
375
case htons(ETH_P_IP):
drivers/net/ovpn/io.c
380
case htons(ETH_P_IPV6):
drivers/net/ovpn/peer.c
210
case htons(ETH_P_IP):
drivers/net/ovpn/peer.c
238
case htons(ETH_P_IPV6):
drivers/net/ovpn/peer.c
386
case htons(ETH_P_IP):
drivers/net/ovpn/peer.c
392
case htons(ETH_P_IPV6):
drivers/net/ovpn/peer.c
749
case htons(ETH_P_IP):
drivers/net/ovpn/peer.c
753
case htons(ETH_P_IPV6):
drivers/net/ovpn/peer.c
876
case htons(ETH_P_IP):
drivers/net/ovpn/peer.c
882
case htons(ETH_P_IPV6):
drivers/net/ovpn/skb.h
51
proto = htons(ETH_P_IP);
drivers/net/ovpn/skb.h
55
proto = htons(ETH_P_IPV6);
drivers/net/ovpn/tcp.c
135
*(__be16 *)__skb_push(skb, sizeof(u16)) = htons(pkt_len);
drivers/net/ovpn/tcp.c
350
*(__be16 *)__skb_push(skb, sizeof(u16)) = htons(len);
drivers/net/pfcp.c
165
udp_conf.local_udp_port = htons(PFCP_PORT);
drivers/net/phy/mscc/mscc_macsec.c
404
MSCC_MS_SAM_MAC_SA_MATCH_HI_ETYPE((__force u32)htons(flow->etype)));
drivers/net/phy/mscc/mscc_ptp.c
378
if (ethhdr->h_proto == htons(ETH_P_1588))
drivers/net/phy/mscc/mscc_ptp.c
382
if (ethhdr->h_proto != htons(ETH_P_IP))
drivers/net/phy/nxp-c45-tja11xx-macsec.c
1567
tlv->eth.h_proto = htons(ETH_P_TJA11XX_TLV);
drivers/net/plip/plip.c
578
return htons(ETH_P_802_3);
drivers/net/plip/plip.c
583
return htons(ETH_P_802_2);
drivers/net/ppp/ppp_generic.c
1779
*(__be16 *)skb_push(skb, 2) = htons(PPP_FILTER_OUTBOUND_TAG);
drivers/net/ppp/ppp_generic.c
2524
*(__be16 *)skb_push(skb, 2) = htons(PPP_FILTER_INBOUND_TAG);
drivers/net/ppp/ppp_generic.c
2549
skb->protocol = htons(npindex_to_ethertype[npi]);
drivers/net/ppp/pppoe.c
902
ph->length = htons(total_len);
drivers/net/ppp/pppoe.c
951
ph->length = htons(data_len);
drivers/net/ppp/pppoe.c
992
path->encap.proto = htons(ETH_P_PPP_SES);
drivers/net/ppp/pptp.c
221
hdr->call_id = htons(opt->dst_addr.call_id);
drivers/net/ppp/pptp.c
230
hdr->payload_len = htons(len);
drivers/net/ppp/pptp.c
244
iph->frag_off = htons(IP_DF);
drivers/net/ppp/pptp.c
252
iph->tot_len = htons(skb->len);
drivers/net/slip/slhc.c
355
|| (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000))
drivers/net/slip/slhc.c
570
thp->urg_ptr = htons(x);
drivers/net/slip/slhc.c
577
thp->window = htons( ntohs(thp->window) + x);
drivers/net/slip/slhc.c
597
ip->id = htons (ntohs (ip->id) + x);
drivers/net/slip/slhc.c
599
ip->id = htons (ntohs (ip->id) + 1);
drivers/net/slip/slhc.c
611
ip->tot_len = htons(len);
drivers/net/slip/slip.c
370
skb->protocol = htons(ETH_P_IP);
drivers/net/tap.c
735
veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb));
drivers/net/team/team_mode_loadbalance.c
20
if (unlikely(skb->protocol == htons(ETH_P_SLOW))) {
drivers/net/thunderbolt/main.c
1020
if (protocol == htons(ETH_P_8021Q)) {
drivers/net/thunderbolt/main.c
1035
if (protocol == htons(ETH_P_IP)) {
drivers/net/thunderbolt/main.c
1057
} else if (protocol == htons(ETH_P_IPV6)) {
drivers/net/tun.c
1827
pi.proto = htons(ETH_P_IP);
drivers/net/tun.c
1830
pi.proto = htons(ETH_P_IPV6);
drivers/net/tun.c
2092
veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb));
drivers/net/usb/aqc111.c
1159
__vlan_hwaccel_put_tag(new_skb, htons(ETH_P_8021Q),
drivers/net/usb/cdc-phonet.c
172
skb->protocol = htons(ETH_P_PHONET);
drivers/net/usb/cdc-phonet.c
55
if (skb->protocol != htons(ETH_P_PHONET))
drivers/net/usb/cdc_mbim.c
214
case htons(ETH_P_IP):
drivers/net/usb/cdc_mbim.c
215
case htons(ETH_P_IPV6):
drivers/net/usb/cdc_mbim.c
327
netdev = __vlan_find_dev_deep_rcu(dev->net, htons(ETH_P_8021Q),
drivers/net/usb/cdc_mbim.c
369
__be16 proto = htons(ETH_P_802_3);
drivers/net/usb/cdc_mbim.c
378
proto = htons(ETH_P_IP);
drivers/net/usb/cdc_mbim.c
383
proto = htons(ETH_P_IPV6);
drivers/net/usb/cdc_mbim.c
406
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tci);
drivers/net/usb/lan78xx.c
3852
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/usb/lg-vl600.c
195
ethhdr->h_proto = htons(ETH_P_IPV6);
drivers/net/usb/lg-vl600.c
285
packet->h_proto = htons(ETH_P_IP);
drivers/net/usb/qmi_wwan.c
203
skbn->protocol = htons(ETH_P_IP);
drivers/net/usb/qmi_wwan.c
206
skbn->protocol = htons(ETH_P_IPV6);
drivers/net/usb/qmi_wwan.c
577
skb->protocol = htons(ETH_P_MAP);
drivers/net/usb/qmi_wwan.c
583
proto = htons(ETH_P_IP);
drivers/net/usb/qmi_wwan.c
586
proto = htons(ETH_P_IPV6);
drivers/net/usb/r8152.c
2263
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/net/usb/r8152.c
2290
case htons(ETH_P_IP):
drivers/net/usb/r8152.c
2294
case htons(ETH_P_IPV6):
drivers/net/usb/r8152.c
2323
case htons(ETH_P_IP):
drivers/net/usb/r8152.c
2328
case htons(ETH_P_IPV6):
drivers/net/vmxnet3/vmxnet3_drv.c
1481
skb->csum = htons(gdesc->rcd.csum);
drivers/net/vmxnet3/vmxnet3_drv.c
1547
BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP) &&
drivers/net/vmxnet3/vmxnet3_drv.c
1548
hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IP));
drivers/net/vmxnet3/vmxnet3_drv.c
1554
BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6) &&
drivers/net/vmxnet3/vmxnet3_drv.c
1555
hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IPV6));
drivers/net/vmxnet3/vmxnet3_drv.c
1580
if (ip_proto == htons(ETH_P_IP)) {
drivers/net/vmxnet3/vmxnet3_drv.c
1937
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci);
drivers/net/vmxnet3/vmxnet3_drv.c
4473
ehdr->h_proto = htons(ETH_P_ARP);
drivers/net/vmxnet3/vmxnet3_drv.c
4477
ahdr->ar_op = htons(ARPOP_REQUEST);
drivers/net/vmxnet3/vmxnet3_ethtool.c
296
case htons(ETH_P_IP):
drivers/net/vmxnet3/vmxnet3_ethtool.c
299
case htons(ETH_P_IPV6):
drivers/net/vrf.c
1212
eth->h_proto = htons(proto);
drivers/net/vrf.c
553
case htons(ETH_P_IP):
drivers/net/vrf.c
555
case htons(ETH_P_IPV6):
drivers/net/vrf.c
612
skb->protocol = htons(ETH_P_IPV6);
drivers/net/vrf.c
688
skb->protocol = htons(ETH_P_IPV6);
drivers/net/vrf.c
865
skb->protocol = htons(ETH_P_IP);
drivers/net/vrf.c
918
skb->protocol = htons(ETH_P_IP);
drivers/net/vxlan/vxlan_core.c
1652
__be16 protocol = htons(ETH_P_TEB);
drivers/net/vxlan/vxlan_core.c
1859
if ((parp->ar_hrd != htons(ARPHRD_ETHER) &&
drivers/net/vxlan/vxlan_core.c
1860
parp->ar_hrd != htons(ARPHRD_IEEE802)) ||
drivers/net/vxlan/vxlan_core.c
1861
parp->ar_pro != htons(ETH_P_IP) ||
drivers/net/vxlan/vxlan_core.c
1862
parp->ar_op != htons(ARPOP_REQUEST) ||
drivers/net/vxlan/vxlan_core.c
1956
reply->protocol = htons(ETH_P_IPV6);
drivers/net/vxlan/vxlan_core.c
1983
eth_hdr(reply)->h_proto = htons(ETH_P_IPV6);
drivers/net/vxlan/vxlan_core.c
1984
reply->protocol = htons(ETH_P_IPV6);
drivers/net/vxlan/vxlan_core.c
2019
pip6->payload_len = htons(sizeof(*na)+na_olen);
drivers/net/vxlan/vxlan_core.c
2194
__be16 inner_protocol = htons(ETH_P_TEB);
drivers/net/vxlan/vxlan_core.c
2370
no_eth_encap = flags & VXLAN_F_GPE && skb->protocol != htons(ETH_P_TEB);
drivers/net/vxlan/vxlan_core.c
2502
df = htons(IP_DF);
drivers/net/vxlan/vxlan_core.c
2508
old_iph->frag_off & htons(IP_DF)))
drivers/net/vxlan/vxlan_core.c
2509
df = htons(IP_DF);
drivers/net/vxlan/vxlan_core.c
2513
df = htons(IP_DF);
drivers/net/vxlan/vxlan_core.c
3869
conf->dst_port = htons(IANA_VXLAN_GPE_UDP_PORT);
drivers/net/vxlan/vxlan_core.c
3871
conf->dst_port = htons(vxlan_port);
drivers/net/vxlan/vxlan_core.c
4564
.low = htons(vxlan->cfg.port_min),
drivers/net/vxlan/vxlan_core.c
4565
.high = htons(vxlan->cfg.port_max),
drivers/net/vxlan/vxlan_mdb.c
114
e->addr.proto = htons(ETH_P_IP);
drivers/net/vxlan/vxlan_mdb.c
119
e->addr.proto = htons(ETH_P_IPV6);
drivers/net/vxlan/vxlan_mdb.c
1627
case htons(ETH_P_IP):
drivers/net/vxlan/vxlan_mdb.c
1636
case htons(ETH_P_IPV6):
drivers/net/vxlan/vxlan_mdb.c
1664
case htons(ETH_P_IP):
drivers/net/vxlan/vxlan_mdb.c
1670
case htons(ETH_P_IPV6):
drivers/net/vxlan/vxlan_mdb.c
347
case htons(ETH_P_IP):
drivers/net/vxlan/vxlan_mdb.c
358
case htons(ETH_P_IPV6): {
drivers/net/vxlan/vxlan_mdb.c
386
case htons(ETH_P_IP):
drivers/net/vxlan/vxlan_mdb.c
391
case htons(ETH_P_IPV6):
drivers/net/vxlan/vxlan_mdb.c
642
if (entry->addr.proto != htons(ETH_P_IP) &&
drivers/net/vxlan/vxlan_mdb.c
643
entry->addr.proto != htons(ETH_P_IPV6)) {
drivers/net/wan/farsync.c
819
return htons(ETH_P_CUST);
drivers/net/wan/fsl_ucc_hdlc.c
369
*proto_head = htons(DEFAULT_HDLC_HEAD);
drivers/net/wan/fsl_ucc_hdlc.c
376
if (*proto_head != htons(DEFAULT_PPP_HEAD)) {
drivers/net/wan/hdlc_cisco.c
112
skb->protocol = htons(ETH_P_HDLC);
drivers/net/wan/hdlc_cisco.c
82
data->protocol = htons(type);
drivers/net/wan/hdlc_fr.c
1096
__be16 addr = htons(dlci);
drivers/net/wan/hdlc_fr.c
280
case htons(ETH_P_IP):
drivers/net/wan/hdlc_fr.c
285
case htons(ETH_P_IPV6):
drivers/net/wan/hdlc_fr.c
427
skb->protocol = htons(ETH_P_HDLC);
drivers/net/wan/hdlc_fr.c
544
skb->protocol = htons(ETH_P_HDLC);
drivers/net/wan/hdlc_fr.c
951
skb->protocol = htons(ETH_P_IP);
drivers/net/wan/hdlc_fr.c
959
skb->protocol = htons(ETH_P_IPV6);
drivers/net/wan/hdlc_ppp.c
143
return htons(ETH_P_HDLC);
drivers/net/wan/hdlc_ppp.c
146
return htons(ETH_P_HDLC);
drivers/net/wan/hdlc_ppp.c
151
return htons(ETH_P_IP);
drivers/net/wan/hdlc_ppp.c
155
return htons(ETH_P_IPV6);
drivers/net/wan/hdlc_ppp.c
158
return htons(ETH_P_HDLC);
drivers/net/wan/hdlc_ppp.c
178
data->protocol = htons(PID_IP);
drivers/net/wan/hdlc_ppp.c
181
data->protocol = htons(PID_IPV6);
drivers/net/wan/hdlc_ppp.c
186
data->protocol = htons(type);
drivers/net/wan/hdlc_ppp.c
228
cp->len = htons(sizeof(struct cp_header) + magic_len + len);
drivers/net/wan/hdlc_ppp.c
251
skb->protocol = htons(ETH_P_HDLC);
drivers/net/wan/lapbether.c
254
skb->protocol = htons(ETH_P_DEC);
drivers/net/wireguard/allowedips.c
399
if (skb->protocol == htons(ETH_P_IP))
drivers/net/wireguard/allowedips.c
401
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/wireguard/allowedips.c
410
if (skb->protocol == htons(ETH_P_IP))
drivers/net/wireguard/allowedips.c
412
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/wireguard/cookie.c
107
if (skb->protocol == htons(ETH_P_IP))
drivers/net/wireguard/cookie.c
110
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/wireguard/device.c
156
if (skb->protocol == htons(ETH_P_IP))
drivers/net/wireguard/device.c
159
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/wireguard/device.c
226
if (skb->protocol == htons(ETH_P_IP))
drivers/net/wireguard/device.c
228
else if (skb->protocol == htons(ETH_P_IPV6))
drivers/net/wireguard/ratelimiter.c
101
else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/wireguard/ratelimiter.c
95
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/wireguard/receive.c
385
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/wireguard/receive.c
390
} else if (skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/wireguard/selftest/ratelimiter.c
150
skb4->protocol = htons(ETH_P_IP);
drivers/net/wireguard/selftest/ratelimiter.c
162
skb6->protocol = htons(ETH_P_IPV6);
drivers/net/wireguard/socket.c
239
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/wireguard/socket.c
245
} else if (IS_ENABLED(CONFIG_IPV6) && skb->protocol == htons(ETH_P_IPV6)) {
drivers/net/wireguard/socket.c
362
.local_udp_port = htons(port),
drivers/net/wireless/ath/ath6kl/wmi.c
332
if (llc_hdr->eth_type == htons(ip_type)) {
drivers/net/wireless/ath/wil6210/txrx.c
1026
skb->protocol = htons(ETH_P_802_2);
drivers/net/wireless/ath/wil6210/txrx.c
1526
if (ethertype == htons(ETH_P_8021Q) && skb->len >= VLAN_ETH_HLEN)
drivers/net/wireless/ath/wil6210/txrx.c
1529
case htons(ETH_P_ARP):
drivers/net/wireless/ath/wil6210/txrx.c
1530
case htons(ETH_P_IP):
drivers/net/wireless/ath/wil6210/txrx.c
1531
case htons(ETH_P_IPV6):
drivers/net/wireless/ath/wil6210/txrx.c
944
xmit_skb->protocol = htons(ETH_P_802_3);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
358
if (eh->h_proto == htons(ETH_P_PAE))
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
478
skb->protocol = htons(ETH_P_802_2);
drivers/net/wireless/intel/ipw2x00/libipw_rx.c
43
skb->protocol = htons(ETH_P_80211_RAW);
drivers/net/wireless/intel/ipw2x00/libipw_rx.c
745
len = htons(skb->len);
drivers/net/wireless/intel/ipw2x00/libipw_rx.c
788
skb2->protocol = htons(ETH_P_802_3);
drivers/net/wireless/intel/ipw2x00/libipw_tx.c
125
if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX))
drivers/net/wireless/intel/ipw2x00/libipw_tx.c
214
if (eth->h_proto != htons(ETH_P_IP))
drivers/net/wireless/intel/ipw2x00/libipw_tx.c
284
encrypt = !(ether_type == htons(ETH_P_PAE) && ieee->ieee802_1x) &&
drivers/net/wireless/intel/ipw2x00/libipw_tx.c
291
ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) {
drivers/net/wireless/intel/iwlwifi/iwl-utils.c
23
bool ipv4 = (skb->protocol == htons(ETH_P_IP));
drivers/net/wireless/intel/iwlwifi/iwl-utils.c
57
ip_hdr(tmp)->id = htons(ip_base_id + i * num_subframes);
drivers/net/wireless/intel/iwlwifi/mei/net.c
112
if (arp->ar_op == htons(ARPOP_REQUEST) &&
drivers/net/wireless/intel/iwlwifi/mei/net.c
125
arp->ar_op == htons(ARPOP_REPLY)) {
drivers/net/wireless/intel/iwlwifi/mei/net.c
309
case htons(ETH_P_IP):
drivers/net/wireless/intel/iwlwifi/mei/net.c
312
case htons(ETH_P_ARP):
drivers/net/wireless/intel/iwlwifi/mei/net.c
315
case htons(ETH_P_IPV6):
drivers/net/wireless/intel/iwlwifi/mei/net.c
379
if (origskb->protocol != htons(ETH_P_IP) ||
drivers/net/wireless/intel/iwlwifi/mei/net.c
381
udp_hdr(origskb)->source != htons(DHCP_CLIENT_PORT) ||
drivers/net/wireless/intel/iwlwifi/mei/net.c
382
udp_hdr(origskb)->dest != htons(DHCP_SERVER_PORT))
drivers/net/wireless/intel/iwlwifi/mei/net.c
95
if (arp->ar_hrd != htons(ARPHRD_ETHER) ||
drivers/net/wireless/intel/iwlwifi/mei/net.c
96
arp->ar_pro != htons(ETH_P_IP))
drivers/net/wireless/intel/iwlwifi/mld/mac80211.c
2016
if (skb->protocol != htons(ETH_P_IP))
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1608
(shdr->type != htons(ETH_P_IP) &&
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1609
shdr->type != htons(ETH_P_ARP) &&
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1610
shdr->type != htons(ETH_P_IPV6) &&
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1611
shdr->type != htons(ETH_P_8021Q) &&
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1612
shdr->type != htons(ETH_P_PAE) &&
drivers/net/wireless/intel/iwlwifi/mld/rx.c
1613
shdr->type != htons(ETH_P_TDLS))))
drivers/net/wireless/intel/iwlwifi/mld/tx.c
227
if (WARN_ONCE(skb->protocol != htons(ETH_P_IP) &&
drivers/net/wireless/intel/iwlwifi/mld/tx.c
228
skb->protocol != htons(ETH_P_IPV6),
drivers/net/wireless/intel/iwlwifi/mld/tx.c
234
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/wireless/intel/iwlwifi/mld/tx.c
278
if (skb->protocol == htons(ETH_P_IP) && amsdu) {
drivers/net/wireless/intel/iwlwifi/mld/tx.c
825
if (skb->protocol == htons(ETH_P_IPV6) &&
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
6316
if (skb->protocol != htons(ETH_P_IP))
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
167
(shdr->type != htons(ETH_P_IP) &&
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
168
shdr->type != htons(ETH_P_ARP) &&
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
169
shdr->type != htons(ETH_P_IPV6) &&
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
170
shdr->type != htons(ETH_P_8021Q) &&
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
171
shdr->type != htons(ETH_P_PAE) &&
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
172
shdr->type != htons(ETH_P_TDLS))))
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
113
if (skb->protocol == htons(ETH_P_IP) && amsdu) {
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
61
(skb->protocol != htons(ETH_P_IP) &&
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
62
skb->protocol != htons(ETH_P_IPV6)),
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
68
if (skb->protocol == htons(ETH_P_IP)) {
drivers/net/wireless/intel/iwlwifi/mvm/tx.c
919
if (skb->protocol == htons(ETH_P_IPV6) &&
drivers/net/wireless/marvell/mwifiex/11n_aggr.c
69
tx_header->eth803_hdr.h_proto = htons(skb_src->len + LLC_SNAP_LEN);
drivers/net/wireless/marvell/mwifiex/main.c
784
if (eth_hdr->h_proto == htons(ETH_P_PAE))
drivers/net/wireless/marvell/mwifiex/sta_rx.c
35
if (arp->hdr.ar_op == htons(ARPOP_REPLY) ||
drivers/net/wireless/marvell/mwifiex/sta_rx.c
36
arp->hdr.ar_op == htons(ARPOP_REQUEST)) {
drivers/net/wireless/microchip/wilc1000/mon.c
185
skb2->protocol = htons(ETH_P_802_2);
drivers/net/wireless/microchip/wilc1000/mon.c
92
skb->protocol = htons(ETH_P_802_2);
drivers/net/wireless/microchip/wilc1000/wlan.c
135
if (eth_hdr_ptr->h_proto != htons(ETH_P_IP))
drivers/net/wireless/microchip/wilc1000/wlan.c
320
case htons(ETH_P_IP):
drivers/net/wireless/microchip/wilc1000/wlan.c
323
case htons(ETH_P_IPV6):
drivers/net/wireless/quantenna/qtnfmac/core.c
127
if (unlikely(skb->protocol == htons(ETH_P_PAE))) {
drivers/net/wireless/realtek/rtw89/core.c
1110
if (skb->protocol == htons(ETH_P_ARP)) {
drivers/net/wireless/realtek/rtw89/core.c
1115
if (skb->protocol == htons(ETH_P_IP) &&
drivers/net/wireless/realtek/rtw89/core.c
1118
if (((udphdr->source == htons(67) && udphdr->dest == htons(68)) ||
drivers/net/wireless/realtek/rtw89/core.c
1119
(udphdr->source == htons(68) && udphdr->dest == htons(67))) &&
drivers/net/wireless/realtek/rtw89/core.c
1126
if (skb->protocol == htons(ETH_P_IP) &&
drivers/net/wireless/realtek/rtw89/fw.c
2921
arp_skb->llc_type = htons(ETH_P_ARP);
drivers/net/wireless/realtek/rtw89/fw.c
2924
arp_hdr->ar_hrd = htons(ARPHRD_ETHER);
drivers/net/wireless/realtek/rtw89/fw.c
2925
arp_hdr->ar_pro = htons(ETH_P_IP);
drivers/net/wireless/realtek/rtw89/fw.c
2928
arp_hdr->ar_op = htons(ARPOP_REPLY);
drivers/net/wireless/virtual/mac80211_hwsim.c
1304
skb->protocol = htons(ETH_P_802_2);
drivers/net/wireless/virtual/mac80211_hwsim.c
1347
skb->protocol = htons(ETH_P_802_2);
drivers/net/wwan/iosm/iosm_ipc_wwan.c
228
skb->protocol = htons(ETH_P_IP);
drivers/net/wwan/iosm/iosm_ipc_wwan.c
231
skb->protocol = htons(ETH_P_IPV6);
drivers/net/wwan/mhi_wwan_mbim.c
328
skbn->protocol = htons(ETH_P_IP);
drivers/net/wwan/mhi_wwan_mbim.c
331
skbn->protocol = htons(ETH_P_IPV6);
drivers/net/wwan/qcom_bam_dmux.c
527
skb->protocol = htons(ETH_P_IP);
drivers/net/wwan/qcom_bam_dmux.c
530
skb->protocol = htons(ETH_P_IPV6);
drivers/net/wwan/qcom_bam_dmux.c
533
skb->protocol = htons(ETH_P_MAP);
drivers/net/wwan/t7xx/t7xx_netdev.c
433
skb->protocol = htons(ETH_P_IPV6);
drivers/net/wwan/t7xx/t7xx_netdev.c
435
skb->protocol = htons(ETH_P_IP);
drivers/net/xen-netback/hash.c
163
case htons(ETH_P_IP):
drivers/net/xen-netback/hash.c
170
case htons(ETH_P_IPV6):
drivers/net/xen-netback/hash.c
189
case htons(ETH_P_IP):
drivers/net/xen-netback/hash.c
213
case htons(ETH_P_IPV6):
drivers/net/xen-netback/rx.c
310
skb->protocol == htons(ETH_P_IP) ?
drivers/net/xen-netback/rx.c
315
skb->protocol == htons(ETH_P_IP) ?
drivers/platform/mellanox/mlxbf-tmfifo.c
567
hdr.len = htons(size);
drivers/platform/mellanox/mlxbf-tmfifo.c
720
hdr.len = htons(vring->pkt_len - hdr_len);
drivers/rapidio/rio_cm.c
1031
hdr->dst_ch = htons(ch->rem_channel);
drivers/rapidio/rio_cm.c
1032
hdr->src_ch = htons(ch->id);
drivers/rapidio/rio_cm.c
1409
hdr->dst_ch = htons(ch->rem_channel);
drivers/rapidio/rio_cm.c
1410
hdr->src_ch = htons(ch->id);
drivers/rapidio/rio_cm.c
812
hdr->dst_ch = htons(ch->rem_channel);
drivers/rapidio/rio_cm.c
813
hdr->src_ch = htons(ch->id);
drivers/rapidio/rio_cm.c
814
hdr->msg_len = htons((u16)len);
drivers/rapidio/rio_cm.c
980
hdr->dst_ch = htons(rem_ch);
drivers/rapidio/rio_cm.c
981
hdr->src_ch = htons(loc_ch);
drivers/s390/net/ctcm_mpc.c
1102
pskb->protocol = htons(ETH_P_SNAP);
drivers/s390/net/ctcm_mpc.c
1104
pskb->protocol = htons(ETH_P_SNA_DIX);
drivers/s390/net/ctcm_mpc.c
2112
skb->protocol = htons(ETH_P_SNAP);
drivers/s390/net/qeth_core.h
961
if (proto == htons(ETH_P_IPV6))
drivers/s390/net/qeth_core.h
991
if ((proto == htons(ETH_P_IP) && ip_hdr(skb)->protocol == IPPROTO_UDP) ||
drivers/s390/net/qeth_core.h
992
(proto == htons(ETH_P_IPV6) && ipv6_hdr(skb)->nexthdr == IPPROTO_UDP))
drivers/s390/net/qeth_core_main.c
3851
case htons(ETH_P_IP):
drivers/s390/net/qeth_core_main.c
3854
case htons(ETH_P_IPV6):
drivers/s390/net/qeth_core_main.c
3876
if (veth->h_vlan_proto == htons(ETH_P_8021Q))
drivers/s390/net/qeth_core_main.c
5520
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tag);
drivers/s390/net/qeth_core_main.c
6899
case htons(ETH_P_IP):
drivers/s390/net/qeth_core_main.c
6906
case htons(ETH_P_IPV6):
drivers/s390/net/qeth_core_main.c
692
qeth_dst_check_rcu(skb, htons(ETH_P_IP)));
drivers/s390/net/qeth_core_main.c
719
qeth_dst_check_rcu(skb, htons(ETH_P_IPV6)));
drivers/s390/net/qeth_l2_main.c
187
if (veth->h_vlan_proto == htons(ETH_P_8021Q)) {
drivers/s390/net/qeth_l3_main.c
1586
case htons(ETH_P_IP):
drivers/s390/net/qeth_l3_main.c
1591
case htons(ETH_P_IPV6):
drivers/s390/net/qeth_l3_main.c
1594
case htons(ETH_P_AF_IUCV):
drivers/s390/net/qeth_l3_main.c
1646
if (proto == htons(ETH_P_IP))
drivers/s390/net/qeth_l3_main.c
1651
if (proto == htons(ETH_P_IP) || IS_IQD(card)) {
drivers/s390/net/qeth_l3_main.c
1657
} else if (veth->h_vlan_proto == htons(ETH_P_8021Q)) {
drivers/s390/net/qeth_l3_main.c
1672
case htons(ETH_P_IP):
drivers/s390/net/qeth_l3_main.c
1676
case htons(ETH_P_IPV6):
drivers/s390/net/qeth_l3_main.c
1683
case htons(ETH_P_AF_IUCV):
drivers/s390/net/qeth_l3_main.c
1684
l3_hdr->next_hop.addr.s6_addr16[0] = htons(0xfe80);
drivers/s390/net/qeth_l3_main.c
1746
case htons(ETH_P_AF_IUCV):
drivers/s390/net/qeth_l3_main.c
1750
case htons(ETH_P_IP):
drivers/s390/net/qeth_l3_main.c
1751
case htons(ETH_P_IPV6):
drivers/s390/net/qeth_l3_main.c
1766
if (proto == htons(ETH_P_IP) || IS_IQD(card))
drivers/s390/net/qeth_l3_main.c
1815
if (vlan_get_protocol(skb) != htons(ETH_P_IP))
drivers/scsi/bnx2fc/bnx2fc_els.c
607
rec.rec_ox_id = htons(orig_io_req->xid);
drivers/scsi/bnx2fc/bnx2fc_els.c
608
rec.rec_rx_id = htons(orig_io_req->task->rxwr_txrd.var_ctx.rx_id);
drivers/scsi/bnx2fc/bnx2fc_els.c
647
srr.srr_ox_id = htons(orig_io_req->xid);
drivers/scsi/bnx2fc/bnx2fc_els.c
648
srr.srr_rx_id = htons(orig_io_req->task->rxwr_txrd.var_ctx.rx_id);
drivers/scsi/bnx2fc/bnx2fc_els.c
94
rrq.rrq_ox_id = htons(aborted_io_req->xid);
drivers/scsi/bnx2fc/bnx2fc_els.c
95
rrq.rrq_rx_id = htons(aborted_io_req->task->rxwr_txrd.var_ctx.rx_id);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
1259
interface->fip_packet_type.type = htons(ETH_P_FIP);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
368
skb->protocol = htons(ETH_P_FCOE);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
373
eh->h_proto = htons(ETH_P_FCOE);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
447
if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
drivers/scsi/bnx2fc/bnx2fc_hwi.c
1678
fc_hdr->fh_rx_id = htons(0xffff);
drivers/scsi/bnx2fc/bnx2fc_hwi.c
587
fh->fh_ox_id = htons(l2_oxid);
drivers/scsi/bnx2fc/bnx2fc_io.c
877
fc_hdr->fh_ox_id = htons(io_req->xid);
drivers/scsi/bnx2fc/bnx2fc_io.c
878
fc_hdr->fh_rx_id = htons(io_req->task->rxwr_txrd.var_ctx.rx_id);
drivers/scsi/csiostor/csio_lnode.c
217
cmd->ct_cmd = htons(op);
drivers/scsi/csiostor/csio_lnode.c
251
ae->type = htons(type);
drivers/scsi/csiostor/csio_lnode.c
254
ae->len = htons(len);
drivers/scsi/csiostor/csio_mb.c
322
cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_CTRL_OFLD);
drivers/scsi/csiostor/csio_mb.c
324
cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_INITIATOR);
drivers/scsi/csiostor/csio_mb.c
326
cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_TARGET);
drivers/scsi/csiostor/csio_mb.c
461
cmdp->fl0size = htons(iq_params->fl0size);
drivers/scsi/csiostor/csio_mb.c
462
cmdp->fl0size = htons(iq_params->fl1size);
drivers/scsi/csiostor/csio_mb.c
511
cmdp->iqid |= htons(iq_params->iqid);
drivers/scsi/csiostor/csio_mb.c
512
cmdp->fl0id |= htons(iq_params->fl0id);
drivers/scsi/csiostor/csio_mb.c
513
cmdp->fl1id |= htons(iq_params->fl1id);
drivers/scsi/csiostor/csio_mb.c
519
cmdp->iqdroprss_to_iqesize |= htons(
drivers/scsi/csiostor/csio_mb.c
527
cmdp->iqsize |= htons(iq_params->iqsize);
drivers/scsi/csiostor/csio_mb.c
546
cmdp->fl0dcaen_to_fl0cidxfthresh |= htons(
drivers/scsi/csiostor/csio_mb.c
552
cmdp->fl0size |= htons(iq_params->fl0size);
drivers/scsi/csiostor/csio_mb.c
638
cmdp->iqid = htons(iq_params->iqid);
drivers/scsi/csiostor/csio_mb.c
639
cmdp->fl0id = htons(iq_params->fl0id);
drivers/scsi/csiostor/csio_mb.c
640
cmdp->fl1id = htons(iq_params->fl1id);
drivers/scsi/csiostor/csio_mb.c
927
cmdp->iqid = htons(iqid);
drivers/scsi/csiostor/csio_rnode.c
542
rn->rn_sparm.clsp[fc_class - 1].cp_class = htons(FC_CPC_VALID);
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
1172
req->word = htons(31);
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
1208
req->word = htons(31);
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
2094
req->reply_ctrl = htons(NO_REPLY_V(0) | QUEUENO_V(csk->rss_qid));
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
2095
req->word_cookie = htons(0);
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
2129
req->reply_ctrl = htons(NO_REPLY_V(0) | QUEUENO_V(csk->rss_qid));
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
2130
req->word_cookie = htons(0);
drivers/scsi/cxgbi/libcxgbi.c
478
*port = htons(pmap->sport_base + idx);
drivers/scsi/fcoe/fcoe.c
1527
skb->protocol = htons(ETH_P_FCOE);
drivers/scsi/fcoe/fcoe.c
1534
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
drivers/scsi/fcoe/fcoe.c
1541
eh->h_proto = htons(ETH_P_FCOE);
drivers/scsi/fcoe/fcoe.c
354
fcoe->fcoe_packet_type.type = htons(ETH_P_FCOE);
drivers/scsi/fcoe/fcoe.c
359
fcoe->fip_packet_type.type = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe.c
365
fcoe->fip_vlan_packet_type.type = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
2054
frame->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
2057
frame->fip.fip_op = htons(FIP_OP_VN2VN);
drivers/scsi/fcoe/fcoe_ctlr.c
2059
frame->fip.fip_dl_len = htons(dlen / FIP_BPW);
drivers/scsi/fcoe/fcoe_ctlr.c
2097
size->fd_size = htons(fcoe_ctlr_fcoe_size(fip));
drivers/scsi/fcoe/fcoe_ctlr.c
2101
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
2921
frame->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
2924
frame->fip.fip_op = htons(FIP_OP_VLAN);
drivers/scsi/fcoe/fcoe_ctlr.c
2926
frame->fip.fip_dl_len = htons(dlen / FIP_BPW);
drivers/scsi/fcoe/fcoe_ctlr.c
2937
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
399
sol->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
402
sol->fip.fip_op = htons(FIP_OP_DISC);
drivers/scsi/fcoe/fcoe_ctlr.c
404
sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW);
drivers/scsi/fcoe/fcoe_ctlr.c
405
sol->fip.fip_flags = htons(FIP_FL_FPMA);
drivers/scsi/fcoe/fcoe_ctlr.c
407
sol->fip.fip_flags |= htons(FIP_FL_SPMA);
drivers/scsi/fcoe/fcoe_ctlr.c
420
sol->desc.size.fd_size = htons(fcoe_size);
drivers/scsi/fcoe/fcoe_ctlr.c
423
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
558
kal->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
561
kal->fip.fip_op = htons(FIP_OP_CTRL);
drivers/scsi/fcoe/fcoe_ctlr.c
563
kal->fip.fip_dl_len = htons((sizeof(kal->mac) +
drivers/scsi/fcoe/fcoe_ctlr.c
565
kal->fip.fip_flags = htons(FIP_FL_FPMA);
drivers/scsi/fcoe/fcoe_ctlr.c
567
kal->fip.fip_flags |= htons(FIP_FL_SPMA);
drivers/scsi/fcoe/fcoe_ctlr.c
581
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
641
cap->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/fcoe/fcoe_ctlr.c
644
cap->fip.fip_op = htons(FIP_OP_LS);
drivers/scsi/fcoe/fcoe_ctlr.c
649
cap->fip.fip_flags = htons(fip_flags);
drivers/scsi/fcoe/fcoe_ctlr.c
672
cap->fip.fip_dl_len = htons(dlen / FIP_BPW);
drivers/scsi/fcoe/fcoe_ctlr.c
674
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/libfc/fc_encode.h
763
csp->sp_bb_cred = htons(10); /* this gets set by gateway */
drivers/scsi/libfc/fc_encode.h
764
csp->sp_bb_data = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_encode.h
766
cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
drivers/scsi/libfc/fc_encode.h
767
csp->sp_features = htons(FC_SP_FT_CIRO);
drivers/scsi/libfc/fc_encode.h
768
csp->sp_tot_seq = htons(255); /* seq. we accept */
drivers/scsi/libfc/fc_encode.h
769
csp->sp_rel_off = htons(0x1f);
drivers/scsi/libfc/fc_encode.h
772
cp->cp_rdfs = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_encode.h
773
cp->cp_con_seq = htons(255);
drivers/scsi/libfc/fc_encode.h
78
ct->hdr.ct_cmd = htons((u16) op);
drivers/scsi/libfc/fc_encode.h
794
sp->sp_bb_cred = htons(10); /* this gets set by gateway */
drivers/scsi/libfc/fc_encode.h
795
sp->sp_bb_data = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_encode.h
797
cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
drivers/scsi/libfc/fc_encode.h
799
sp->sp_features = htons(FC_SP_FT_NPIV);
drivers/scsi/libfc/fc_encode.h
819
sp->sp_bb_cred = htons(10); /* this gets set by gateway */
drivers/scsi/libfc/fc_encode.h
820
sp->sp_bb_data = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_encode.h
822
cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
drivers/scsi/libfc/fc_encode.h
863
rec->rec_ox_id = htons(ep->oxid);
drivers/scsi/libfc/fc_encode.h
864
rec->rec_rx_id = htons(ep->rxid);
drivers/scsi/libfc/fc_encode.h
881
pp->prli.prli_len = htons(sizeof(*pp));
drivers/scsi/libfc/fc_exch.c
1079
fh->fh_rx_id = htons(FC_XID_UNKNOWN);
drivers/scsi/libfc/fc_exch.c
1444
ap->ba_high_seq_cnt = htons(0xffff);
drivers/scsi/libfc/fc_exch.c
1449
ap->ba_low_seq_cnt = htons(sp->cnt);
drivers/scsi/libfc/fc_exch.c
1533
if (fh->fh_rx_id == htons(FC_XID_UNKNOWN))
drivers/scsi/libfc/fc_exch.c
2072
acc->reca_rx_id = htons(ep->rxid);
drivers/scsi/libfc/fc_exch.c
2260
rrq->rrq_ox_id = htons(ep->oxid);
drivers/scsi/libfc/fc_exch.c
2261
rrq->rrq_rx_id = htons(ep->rxid);
drivers/scsi/libfc/fc_exch.c
298
fh->fh_ox_id = htons(ep->oxid);
drivers/scsi/libfc/fc_exch.c
299
fh->fh_rx_id = htons(ep->rxid);
drivers/scsi/libfc/fc_exch.c
301
fh->fh_seq_cnt = htons(ep->seq.cnt);
drivers/scsi/libfc/fc_fcp.c
1737
srr->srr_ox_id = htons(ep->oxid);
drivers/scsi/libfc/fc_fcp.c
1738
srr->srr_rx_id = htons(ep->rxid);
drivers/scsi/libfc/fc_lport.c
369
sp->sp_bb_cred = htons(10); /* this gets set by gateway */
drivers/scsi/libfc/fc_lport.c
370
sp->sp_bb_data = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_lport.c
372
cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ);
drivers/scsi/libfc/fc_lport.c
374
sp->sp_features = htons(FC_SP_FT_CIRO);
drivers/scsi/libfc/fc_lport.c
375
sp->sp_tot_seq = htons(255); /* seq. we accept */
drivers/scsi/libfc/fc_lport.c
376
sp->sp_rel_off = htons(0x1f);
drivers/scsi/libfc/fc_lport.c
379
cp->cp_rdfs = htons((u16) lport->mfs);
drivers/scsi/libfc/fc_lport.c
380
cp->cp_con_seq = htons(255);
drivers/scsi/libfc/fc_rport.c
2013
pp->prli.prli_len = htons(len);
drivers/scsi/libfc/fc_rport.c
2125
pp->prlo.prlo_len = htons(len);
drivers/scsi/qedf/qedf_els.c
1048
rec.rec_ox_id = htons(orig_io_req->xid);
drivers/scsi/qedf/qedf_els.c
1050
htons(orig_io_req->task->tstorm_st_context.read_write.rx_id);
drivers/scsi/qedf/qedf_els.c
312
rrq.rrq_ox_id = htons(aborted_io_req->xid);
drivers/scsi/qedf/qedf_els.c
314
htons(aborted_io_req->task->tstorm_st_context.read_write.rx_id);
drivers/scsi/qedf/qedf_els.c
341
fh->fh_ox_id = htons(l2_oxid);
drivers/scsi/qedf/qedf_els.c
673
srr.srr_ox_id = htons(orig_io_req->xid);
drivers/scsi/qedf/qedf_els.c
674
srr.srr_rx_id = htons(orig_io_req->rx_id);
drivers/scsi/qedf/qedf_fip.c
145
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), qedf->vlan_id);
drivers/scsi/qedf/qedf_fip.c
38
vlan->eth.h_proto = htons(ETH_P_FIP);
drivers/scsi/qedf/qedf_fip.c
41
vlan->fip.fip_op = htons(FIP_OP_VLAN);
drivers/scsi/qedf/qedf_fip.c
43
vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW);
drivers/scsi/qedf/qedf_fip.c
54
skb->protocol = htons(ETH_P_FIP);
drivers/scsi/qedf/qedf_io.c
717
fc_hdr->fh_rx_id = htons(0xffff);
drivers/scsi/qedf/qedf_main.c
1203
skb->protocol = htons(ETH_P_FCOE);
drivers/scsi/qedf/qedf_main.c
1209
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), qedf->vlan_id);
drivers/scsi/qedf/qedf_main.c
1213
eh->h_proto = htons(ETH_P_FCOE);
drivers/scsi/qedf/qedf_main.c
2636
if (eh->h_proto == htons(ETH_P_8021Q)) {
drivers/scsi/qedf/qedf_main.c
2647
if (eh->h_proto == htons(ETH_P_FIP)) {
drivers/scsi/qedf/qedf_main.c
2650
} else if (eh->h_proto == htons(ETH_P_FCOE)) {
drivers/scsi/qedi/qedi_iscsi.c
1254
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlanid);
drivers/scsi/qedi/qedi_main.c
687
if (eh->h_proto == htons(ETH_P_8021Q)) {
drivers/scsi/qedi/qedi_main.c
694
if (eh->h_proto != htons(ETH_P_ARP) &&
drivers/scsi/qedi/qedi_main.c
695
eh->h_proto != htons(ETH_P_IP) &&
drivers/scsi/qedi/qedi_main.c
696
eh->h_proto != htons(ETH_P_IPV6)) {
drivers/scsi/qedi/qedi_main.c
723
__vlan_insert_tag(work->skb, htons(ETH_P_8021Q), work->vlan_id);
drivers/scsi/qla2xxx/qla_dbg.c
1066
fw->risc_ram[cnt] = htons(mb2);
drivers/scsi/qla2xxx/qla_dbg.c
1162
fw->mailbox_reg[cnt] = htons(rd_reg_word(mbx_reg));
drivers/scsi/qla2xxx/qla_dbg.c
1441
fw->mailbox_reg[cnt] = htons(rd_reg_word(mbx_reg));
drivers/scsi/qla2xxx/qla_dbg.c
1752
fw->mailbox_reg[cnt] = htons(rd_reg_word(mbx_reg));
drivers/scsi/qla2xxx/qla_dbg.c
2087
fw->mailbox_reg[cnt] = htons(rd_reg_word(mbx_reg));
drivers/scsi/qla2xxx/qla_dbg.c
469
*buf++ = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
771
fw->hccr = htons(rd_reg_word(®->hccr));
drivers/scsi/qla2xxx/qla_dbg.c
792
fw->pbiu_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
797
fw->risc_host_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
802
fw->mailbox_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
814
fw->risc_hdw_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
927
fw->hccr = htons(rd_reg_word(®->hccr));
drivers/scsi/qla2xxx/qla_dbg.c
941
fw->pbiu_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
948
fw->mailbox_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
953
fw->dma_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla2xxx/qla_dbg.c
958
fw->risc_hdw_reg[cnt] = htons(rd_reg_word(dmp_reg));
drivers/scsi/qla4xxx/ql4_os.c
6598
addr6->sin6_port = htons(le16_to_cpu(fw_ddb_entry->port));
drivers/scsi/qla4xxx/ql4_os.c
6606
addr->sin_port = htons(le16_to_cpu(fw_ddb_entry->port));
drivers/staging/octeon/ethernet-tx.c
362
if ((skb->protocol == htons(ETH_P_IP)) &&
drivers/staging/octeon/ethernet-tx.c
366
(ip_hdr(skb)->frag_off == htons(1 << 14))) &&
drivers/staging/octeon/ethernet-tx.c
574
if (skb->protocol == htons(ETH_P_IP)) {
drivers/staging/octeon/ethernet-tx.c
593
work->word2.snoip.is_rarp = skb->protocol == htons(ETH_P_RARP);
drivers/staging/octeon/ethernet-tx.c
594
work->word2.snoip.is_arp = skb->protocol == htons(ETH_P_ARP);
drivers/staging/rtl8723bs/core/rtw_recv.c
1618
be_tmp = htons(len);
drivers/staging/rtl8723bs/core/rtw_recv.c
1656
len = htons(sub_skb->len);
drivers/staging/rtl8723bs/core/rtw_xmit.c
1364
*(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
drivers/staging/rtl8723bs/os_dep/os_intfs.c
328
case htons(ETH_P_IP):
drivers/target/iscsi/cxgbit/cxgbit_cm.c
1526
req->reply_ctrl = htons(NO_REPLY_V(0) | QUEUENO_V(csk->rss_qid));
drivers/target/iscsi/cxgbit/cxgbit_cm.c
1527
req->word_cookie = htons(0);
drivers/target/iscsi/cxgbit/cxgbit_cm.c
1560
req->reply_ctrl = htons(NO_REPLY_V(0) | QUEUENO_V(csk->rss_qid));
drivers/target/iscsi/cxgbit/cxgbit_cm.c
1561
req->word_cookie = htons(0);
drivers/target/iscsi/cxgbit/cxgbit_target.c
147
cpl->mpdu = htons(DIV_ROUND_UP(iso_info->mpdu, 4));
drivers/tty/n_gsm.c
3992
skb->protocol = htons(ETH_P_IP);
drivers/tty/n_gsm.c
4051
if (nc->protocol != htons(ETH_P_IP))
drivers/usb/gadget/function/f_phonet.c
231
if (skb->protocol != htons(ETH_P_PHONET))
drivers/usb/gadget/function/f_phonet.c
337
skb->protocol = htons(ETH_P_PHONET);
fs/afs/addr_list.c
297
srx.transport.sin.sin_port = htons(port);
fs/afs/addr_list.c
341
srx.transport.sin6.sin6_port = htons(port);
fs/afs/cmservice.c
349
r->time_mid = htons(ntohl(b[1]));
fs/afs/cmservice.c
350
r->time_hi_and_version = htons(ntohl(b[2]));
fs/afs/cmservice.c
466
r->time_mid = htons(ntohl(b[1]));
fs/afs/cmservice.c
467
r->time_hi_and_version = htons(ntohl(b[2]));
fs/afs/dir_edit.c
214
block->hdr.npages = htons(1);
fs/afs/dir_edit.c
360
meta->meta.hashtable[iter.bucket] = htons(entry);
fs/afs/dir_edit.c
469
if (unlikely(prev_next != htons(entry))) {
fs/afs/dir_edit.c
487
if (prev_next != htons(entry)) {
fs/afs/rxrpc.c
70
srx.transport.sin6.sin6_port = htons(AFS_CM_PORT);
fs/afs/vlclient.c
64
uuid->time_mid = htons(ntohl(xdr->time_mid));
fs/afs/vlclient.c
65
uuid->time_hi_and_version = htons(ntohl(xdr->time_hi_and_version));
fs/afs/xdr_fs.h
77
#define AFS_DIR_MAGIC htons(1234)
fs/nfs/pnfs_nfs.c
1118
port = htons((tmp[0] << 8) | (tmp[1]));
fs/ocfs2/cluster/nodemanager.c
257
node->nd_ipv4_port = htons(tmp);
fs/ocfs2/cluster/tcp.c
1616
myaddr.sin_port = htons(0); /* any port */
fs/smb/client/connect.c
1563
port = htons(CIFS_PORT);
fs/smb/client/connect.c
1567
port = htons(RFC1001_PORT);
fs/smb/client/connect.c
3437
(server->rfc1001_sessinit == -1 && sport == htons(RFC1001_PORT)))
fs/smb/client/connect.c
3459
*sport = htons(CIFS_PORT);
fs/smb/client/connect.c
3466
*sport = htons(RFC1001_PORT);
fs/smb/client/netmisc.c
102
((struct sockaddr_in *)addr)->sin_port = htons(port);
fs/smb/client/netmisc.c
105
((struct sockaddr_in6 *)addr)->sin6_port = htons(port);
fs/smb/client/smbdirect.c
967
*sport = htons(port);
fs/smb/server/transport_rdma.c
2794
.sin_port = htons(port),
fs/smb/server/transport_tcp.c
476
sin.sin_port = htons(server_conf.tcp_port);
fs/smb/server/transport_tcp.c
481
sin6.sin6_port = htons(server_conf.tcp_port);
include/linux/ceph/decode.h
228
__be16 ss_family = htons(a->in_addr.ss_family);
include/linux/etherdevice.h
224
proto &= htons(0xFF00);
include/linux/etherdevice.h
227
return (__force u16)proto >= (__force u16)htons(ETH_P_802_3_MIN);
include/linux/hdlc.h
112
return htons(ETH_P_HDLC);
include/linux/if_vlan.h
324
case htons(ETH_P_8021Q):
include/linux/if_vlan.h
325
case htons(ETH_P_8021AD):
include/linux/if_vlan.h
335
if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX)
include/linux/if_vlan.h
337
if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX)
include/linux/if_vlan.h
388
veth->h_vlan_TCI = htons(vlan_tci);
include/linux/if_vlan.h
713
skb->protocol = htons(ETH_P_802_3);
include/linux/if_vlan.h
718
skb->protocol = htons(ETH_P_802_2);
include/linux/ip.h
57
iph->tot_len = len <= IP_MAX_MTU ? htons(len) : 0;
include/linux/ipv6.h
148
ip6->payload_len = len <= IPV6_MAXPLEN ? htons(len) : 0;
include/linux/netdevice.h
5254
if (protocol == htons(ETH_P_FCOE))
include/linux/netdevice.h
5265
case htons(ETH_P_IP):
include/linux/netdevice.h
5267
case htons(ETH_P_IPV6):
include/linux/netdevice.h
5454
return skb->protocol == htons(ETH_P_IPV6) ?
include/linux/netdevice.h
5463
return skb->protocol == htons(ETH_P_IPV6) ?
include/linux/sunrpc/addr.h
39
((struct sockaddr_in *)sap)->sin_port = htons(port);
include/linux/sunrpc/addr.h
42
((struct sockaddr_in6 *)sap)->sin6_port = htons(port);
include/linux/virtio_net.h
137
skb->protocol == htons(ETH_P_IP)) {
include/linux/virtio_net.h
138
skb->protocol = htons(ETH_P_IPV6);
include/linux/virtio_net.h
361
skb_set_inner_protocol(skb, inner_isv6 ? htons(ETH_P_IPV6) :
include/linux/virtio_net.h
362
htons(ETH_P_IP));
include/linux/virtio_net.h
462
if (skb->protocol == htons(ETH_P_IPV6))
include/net/ax25.h
296
return htons(ETH_P_AX25);
include/net/dsfield.h
39
iph->check = (__force __sum16)htons(check);
include/net/dsfield.h
49
*p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4);
include/net/dst_metadata.h
229
if (tun_dst && (iph->frag_off & htons(IP_DF)))
include/net/erspan.h
197
if (eth->h_proto == htons(ETH_P_8021Q)) {
include/net/erspan.h
291
if (eth->h_proto == htons(ETH_P_8021Q)) {
include/net/erspan.h
312
md2->sgt = htons(sgt);
include/net/gue.h
59
#define GUE_FLAG_PRIV htons(1<<0) /* Private flags are in options */
include/net/inet_ecn.h
111
check_add = (__force __be16)((__force u16)htons(0xFFFB) +
include/net/inet_ecn.h
112
(__force u16)htons(ecn));
include/net/inet_ecn.h
124
iph->check = csum16_add(iph->check, htons(0x1));
include/net/inet_ecn.h
306
case htons(ETH_P_IP):
include/net/inet_ecn.h
309
case htons(ETH_P_IPV6):
include/net/inet_ecn.h
325
case htons(ETH_P_IP):
include/net/inet_ecn.h
328
case htons(ETH_P_IPV6):
include/net/ip.h
408
return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;
include/net/ip.h
420
check += (__force u32)htons(0x0100);
include/net/ip.h
578
iph->id = htons(val);
include/net/ip.h
581
if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) {
include/net/ip_tunnels.h
470
case htons(ETH_P_IPV6):
include/net/ip_tunnels.h
474
case htons(ETH_P_IP):
include/net/ip_tunnels.h
506
case htons(ETH_P_IPV6):
include/net/ip_tunnels.h
510
case htons(ETH_P_IP):
include/net/ip_tunnels.h
574
if (payload_protocol == htons(ETH_P_IP))
include/net/ip_tunnels.h
576
else if (payload_protocol == htons(ETH_P_IPV6))
include/net/ip_tunnels.h
587
if (payload_protocol == htons(ETH_P_IPV6))
include/net/ip_tunnels.h
598
if (payload_protocol == htons(ETH_P_IP))
include/net/ip_tunnels.h
600
else if (payload_protocol == htons(ETH_P_IPV6))
include/net/ipv6_frag.h
128
if (offset < 0 || (frag_off & htons(IP6_OFFSET)))
include/net/llc_pdu.h
350
if (ev_skb->protocol == htons(ETH_P_802_2)) {
include/net/macsec.h
21
#define MACSEC_PORT_ES (htons(0x0001))
include/net/mpls.h
21
return eth_type == htons(ETH_P_MPLS_UC) ||
include/net/mpls.h
22
eth_type == htons(ETH_P_MPLS_MC);
include/net/netfilter/nf_flow_table.h
386
case htons(PPP_IP):
include/net/netfilter/nf_flow_table.h
387
return htons(ETH_P_IP);
include/net/netfilter/nf_flow_table.h
388
case htons(PPP_IPV6):
include/net/netfilter/nf_flow_table.h
389
return htons(ETH_P_IPV6);
include/net/netfilter/nf_queue.h
91
case htons(ETH_P_IP):
include/net/netfilter/nf_queue.h
97
case htons(ETH_P_IPV6):
include/net/nsh.h
287
= (nsh->ver_flags_ttl_len & ~htons(xmask)) | htons(xflag);
include/net/tun_proto.h
20
return htons(ETH_P_IP);
include/net/tun_proto.h
22
return htons(ETH_P_IPV6);
include/net/tun_proto.h
24
return htons(ETH_P_TEB);
include/net/tun_proto.h
26
return htons(ETH_P_NSH);
include/net/tun_proto.h
28
return htons(ETH_P_MPLS_UC);
include/net/tun_proto.h
36
case htons(ETH_P_IP):
include/net/tun_proto.h
38
case htons(ETH_P_IPV6):
include/net/tun_proto.h
40
case htons(ETH_P_TEB):
include/net/tun_proto.h
42
case htons(ETH_P_NSH):
include/net/tun_proto.h
44
case htons(ETH_P_MPLS_UC):
include/net/udp.h
379
return htons((((u64) hash * (max - min)) >> 32) + min);
include/net/udplite.h
79
udp_hdr(skb)->len = htons(pcslen);
include/net/vxlan.h
373
case htons(ETH_P_IP):
include/net/vxlan.h
376
case htons(ETH_P_IPV6):
include/net/vxlan.h
385
skb->inner_protocol != htons(ETH_P_TEB) ||
include/net/vxlan.h
604
gbp->policy_id = htons(md->gbp & VXLAN_GBP_ID_MASK);
include/net/x25device.h
16
return htons(ETH_P_X25);
include/net/xfrm.h
1012
port = htons(uli->icmpt.code);
include/net/xfrm.h
1015
port = htons(ntohl(uli->gre_key) & 0xffff);
include/net/xfrm.h
985
port = htons(uli->icmpt.type);
include/net/xfrm.h
988
port = htons(uli->mht.type);
include/net/xfrm.h
991
port = htons(ntohl(uli->gre_key) >> 16);
include/rdma/ib_sa.h
252
ib->ib.dlid = htons(ntohl(opa->opa.dlid));
include/rdma/ib_sa.h
253
ib->ib.slid = htons(ntohl(opa->opa.slid));
include/trace/events/bridge.h
153
} else if (group->proto == htons(ETH_P_IP)) {
kernel/audit.c
2500
case htons(ETH_P_IP):
kernel/audit.c
2503
case htons(ETH_P_IPV6):
lib/test_bpf.c
14748
skb->protocol = htons(ETH_P_IP);
lib/test_bpf.c
14754
skb->vlan_proto = htons(ETH_P_IP);
lib/test_bpf.c
15027
skb[i]->protocol = htons(ETH_P_IP);
lib/test_bpf.c
15081
skb[i]->protocol = htons(ETH_P_IPV6);
lib/tests/blackhole_dev_kunit.c
48
uh->source = uh->dest = htons(UDP_PORT);
lib/tests/blackhole_dev_kunit.c
49
uh->len = htons(data_len);
lib/tests/blackhole_dev_kunit.c
55
ip6h->payload_len = htons(data_len + sizeof(struct udphdr));
lib/tests/blackhole_dev_kunit.c
63
skb->protocol = htons(ETH_P_IPV6);
net/6lowpan/iphc.c
1140
if (skb->protocol != htons(ETH_P_IPV6))
net/6lowpan/iphc.c
754
hdr.payload_len = htons(lowpan_802154_cb(skb)->d_size -
net/6lowpan/iphc.c
757
hdr.payload_len = htons(skb->len);
net/6lowpan/iphc.c
760
hdr.payload_len = htons(skb->len);
net/6lowpan/nhc_udp.c
54
uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT);
net/6lowpan/nhc_udp.c
58
uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT);
net/6lowpan/nhc_udp.c
63
uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4));
net/6lowpan/nhc_udp.c
64
uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f));
net/6lowpan/nhc_udp.c
91
uh.len = htons(lowpan_802154_cb(skb)->d_size -
net/6lowpan/nhc_udp.c
94
uh.len = htons(skb->len + sizeof(struct udphdr));
net/6lowpan/nhc_udp.c
97
uh.len = htons(skb->len + sizeof(struct udphdr));
net/802/fc.c
53
fcllc->ethertype = htons(type);
net/802/fddi.c
109
type = htons(ETH_P_802_2);
net/802/fddi.c
67
fddi->hdr.llc_snap.ethertype = htons(type);
net/802/garp.c
232
skb->protocol = htons(ETH_P_802_2);
net/802/garp.c
236
put_unaligned(htons(GARP_PROTOCOL_ID), &gp->protocol);
net/802/garp.c
530
if (get_unaligned(&gp->protocol) != htons(GARP_PROTOCOL_ID))
net/8021q/vlan.c
228
err = vlan_check_real_dev(real_dev, htons(ETH_P_8021Q), vlan_id,
net/8021q/vlan.c
272
vlan->vlan_proto = htons(ETH_P_8021Q);
net/8021q/vlan.c
372
err = vlan_vid_add(dev, htons(ETH_P_8021Q), 0);
net/8021q/vlan.c
388
vlan_vid_del(dev, htons(ETH_P_8021Q), 0);
net/8021q/vlan.c
533
err = vlan_filter_push_vids(vlan_info, htons(ETH_P_8021Q));
net/8021q/vlan.c
539
vlan_filter_drop_vids(vlan_info, htons(ETH_P_8021Q));
net/8021q/vlan.c
543
err = vlan_filter_push_vids(vlan_info, htons(ETH_P_8021AD));
net/8021q/vlan.c
549
vlan_filter_drop_vids(vlan_info, htons(ETH_P_8021AD));
net/8021q/vlan.h
43
case htons(ETH_P_8021Q):
net/8021q/vlan.h
45
case htons(ETH_P_8021AD):
net/8021q/vlan_core.c
171
if (proto == htons(ETH_P_8021Q) &&
net/8021q/vlan_core.c
174
if (proto == htons(ETH_P_8021AD) &&
net/8021q/vlan_dev.c
62
vhdr->h_vlan_TCI = htons(vlan_tci);
net/8021q/vlan_dev.c
69
vhdr->h_vlan_encapsulated_proto = htons(type);
net/8021q/vlan_dev.c
71
vhdr->h_vlan_encapsulated_proto = htons(len);
net/8021q/vlan_gvrp.c
30
__be16 vlan_id = htons(vlan->vlan_id);
net/8021q/vlan_gvrp.c
32
if (vlan->vlan_proto != htons(ETH_P_8021Q))
net/8021q/vlan_gvrp.c
41
__be16 vlan_id = htons(vlan->vlan_id);
net/8021q/vlan_gvrp.c
43
if (vlan->vlan_proto != htons(ETH_P_8021Q))
net/8021q/vlan_mvrp.c
28
.pkttype.type = htons(ETH_P_MVRP),
net/8021q/vlan_mvrp.c
36
__be16 vlan_id = htons(vlan->vlan_id);
net/8021q/vlan_mvrp.c
38
if (vlan->vlan_proto != htons(ETH_P_8021Q))
net/8021q/vlan_mvrp.c
47
__be16 vlan_id = htons(vlan->vlan_id);
net/8021q/vlan_mvrp.c
49
if (vlan->vlan_proto != htons(ETH_P_8021Q))
net/8021q/vlan_netlink.c
168
htons(ETH_P_8021Q));
net/8021q/vlan_netlink.c
64
case htons(ETH_P_8021Q):
net/8021q/vlan_netlink.c
65
case htons(ETH_P_8021AD):
net/9p/trans_fd.c
862
((struct sockaddr_in *)&stor)->sin_port = htons((ushort)port);
net/9p/trans_fd.c
864
((struct sockaddr_in6 *)&stor)->sin6_port = htons((ushort)port);
net/9p/trans_rdma.c
508
cl.sin_port = htons((ushort)port);
net/9p/trans_rdma.c
565
rdma->addr.sin_port = htons(opts.port);
net/appletalk/aarp.c
135
skb->protocol = htons(ETH_P_ATALK);
net/appletalk/aarp.c
140
eah->hw_type = htons(AARP_HW_TYPE_ETHERNET);
net/appletalk/aarp.c
141
eah->pa_type = htons(ETH_P_ATALK);
net/appletalk/aarp.c
144
eah->function = htons(AARP_REQUEST);
net/appletalk/aarp.c
182
skb->protocol = htons(ETH_P_ATALK);
net/appletalk/aarp.c
187
eah->hw_type = htons(AARP_HW_TYPE_ETHERNET);
net/appletalk/aarp.c
188
eah->pa_type = htons(ETH_P_ATALK);
net/appletalk/aarp.c
191
eah->function = htons(AARP_REPLY);
net/appletalk/aarp.c
233
skb->protocol = htons(ETH_P_ATALK);
net/appletalk/aarp.c
238
eah->hw_type = htons(AARP_HW_TYPE_ETHERNET);
net/appletalk/aarp.c
239
eah->pa_type = htons(ETH_P_ATALK);
net/appletalk/aarp.c
242
eah->function = htons(AARP_PROBE);
net/appletalk/aarp.c
561
*((__be16 *)skb->data) = htons(skb->len);
net/appletalk/aarp.c
579
skb->protocol = htons(ETH_P_PPPTALK);
net/appletalk/aarp.c
589
skb->protocol = htons(ETH_P_ATALK);
net/appletalk/ddp.c
1020
return sum ? htons((unsigned short)sum) : htons(0xFFFF);
net/appletalk/ddp.c
1138
if (!ap || ap->s_net == htons(ATADDR_ANYNET))
net/appletalk/ddp.c
1167
if (addr->sat_addr.s_net == htons(ATADDR_ANYNET)) {
net/appletalk/ddp.c
1352
ddp->deh_len_hops = htons(len_hops);
net/appletalk/ddp.c
1537
ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10));
net/appletalk/ddp.c
1651
ddp->deh_len_hops = htons(len + sizeof(*ddp));
net/appletalk/ddp.c
277
atif->address.s_net = htons(probe_net);
net/appletalk/ddp.c
326
proxy_addr->s_net = htons(probe_net);
net/appletalk/ddp.c
500
atrtr_default.gateway.s_net = htons(0);
net/appletalk/ddp.c
772
if (nr->nr_firstnet == htons(0) &&
net/appletalk/ddp.c
773
nr->nr_lastnet == htons(0xFFFE)) {
net/appletalk/ddp.c
787
sa->sat_addr.s_net = htons(ct);
net/atm/br2684.c
395
if (type == htons(ETH_P_IP) &&
net/atm/br2684.c
399
if (type == htons(ETH_P_ARP))
net/atm/br2684.c
458
skb->protocol = htons(ETH_P_IPV6);
net/atm/br2684.c
461
skb->protocol = htons(ETH_P_IP);
net/atm/br2684.c
486
skb->protocol = htons(ETH_P_IP);
net/atm/br2684.c
488
skb->protocol = htons(ETH_P_IPV6);
net/atm/clip.c
233
skb->protocol = htons(ETH_P_IP);
net/atm/clip.c
237
if (skb->protocol == htons(ETH_P_ARP)) {
net/atm/lec.c
259
lec_h->le_header = htons(priv->lecid);
net/atm/lec.c
642
if (*(__be16 *) skb->data == htons(priv->lecid) ||
net/atm/mpc.c
584
if (eth->h_proto != htons(ETH_P_IP))
net/ax25/ax25_in.c
127
skb->protocol = htons(ETH_P_IP);
net/ax25/ax25_in.c
245
skb->protocol = htons(ETH_P_IP);
net/ax25/ax25_in.c
255
skb->protocol = htons(ETH_P_ARP);
net/batman-adv/bat_iv_ogm.c
829
batadv_ogm_packet->tvlv_len = htons(tvlv_len);
net/batman-adv/bat_v_ogm.c
299
ogm_packet->tvlv_len = htons(tvlv_len);
net/batman-adv/bridge_loop_avoidance.c
1115
} while (proto == htons(ETH_P_8021Q));
net/batman-adv/bridge_loop_avoidance.c
1118
if (proto != htons(ETH_P_ARP))
net/batman-adv/bridge_loop_avoidance.c
1133
if (arphdr->ar_hrd != htons(ARPHRD_ETHER))
net/batman-adv/bridge_loop_avoidance.c
1135
if (arphdr->ar_pro != htons(ETH_P_IP))
net/batman-adv/bridge_loop_avoidance.c
1339
group = htons(crc16(0, primary_if->net_dev->dev_addr, ETH_ALEN));
net/batman-adv/bridge_loop_avoidance.c
1545
bat_priv->bla.claim_dest.group = htons(crc);
net/batman-adv/bridge_loop_avoidance.c
435
skb = vlan_insert_tag(skb, htons(ETH_P_8021Q),
net/batman-adv/bridge_loop_avoidance.c
671
crc = htons(backbone_gw->crc);
net/batman-adv/distributed-arp-table.c
1003
if (ethhdr->h_proto != htons(ETH_P_ARP))
net/batman-adv/distributed-arp-table.c
1014
if (arphdr->ar_hrd != htons(ARPHRD_ETHER))
net/batman-adv/distributed-arp-table.c
1017
if (arphdr->ar_pro != htons(ETH_P_IP))
net/batman-adv/distributed-arp-table.c
1042
if (arphdr->ar_op != htons(ARPOP_REQUEST)) {
net/batman-adv/distributed-arp-table.c
1109
skb = vlan_insert_tag(skb, htons(ETH_P_8021Q),
net/batman-adv/distributed-arp-table.c
1442
if (!udphdr || udphdr->source != htons(67))
net/batman-adv/distributed-arp-table.c
1476
if (proto != htons(ETH_P_IP))
net/batman-adv/distributed-arp-table.c
300
vid = htons(dat->vid);
net/batman-adv/fragmentation.c
487
frag_header.seqno = htons(atomic_inc_return(&bat_priv->frag_seqno));
net/batman-adv/fragmentation.c
490
frag_header.total_size = htons(skb->len);
net/batman-adv/gateway_client.c
574
if (proto == htons(ETH_P_8021Q)) {
net/batman-adv/gateway_client.c
585
case htons(ETH_P_IP):
net/batman-adv/gateway_client.c
597
case htons(ETH_P_IPV6):
net/batman-adv/gateway_client.c
621
case htons(ETH_P_IP):
net/batman-adv/gateway_client.c
622
if (udphdr->dest == htons(67))
net/batman-adv/gateway_client.c
624
else if (udphdr->source == htons(67))
net/batman-adv/gateway_client.c
627
case htons(ETH_P_IPV6):
net/batman-adv/gateway_client.c
628
if (udphdr->dest == htons(547))
net/batman-adv/gateway_client.c
630
else if (udphdr->source == htons(547))
net/batman-adv/hard-interface.c
708
__be16 ethertype = htons(ETH_P_BATMAN);
net/batman-adv/main.c
355
case htons(ETH_P_8021Q):
net/batman-adv/main.c
363
case htons(ETH_P_IP):
net/batman-adv/main.c
370
case htons(ETH_P_IPV6):
net/batman-adv/main.c
577
if (ethhdr->h_proto != htons(ETH_P_8021Q))
net/batman-adv/mesh-interface.c
215
if (proto != htons(ETH_P_BATMAN)) {
net/batman-adv/mesh-interface.c
438
if (vhdr->h_vlan_encapsulated_proto != htons(ETH_P_BATMAN))
net/batman-adv/mesh-interface.c
624
if (proto != htons(ETH_P_8021Q))
net/batman-adv/mesh-interface.c
679
if (proto != htons(ETH_P_8021Q))
net/batman-adv/multicast.c
559
if (src->proto == htons(ETH_P_IP))
net/batman-adv/multicast.c
562
else if (src->proto == htons(ETH_P_IPV6))
net/batman-adv/multicast.c
602
if (br_ip_entry->addr.proto == htons(ETH_P_IP)) {
net/batman-adv/multicast.c
616
if (br_ip_entry->addr.proto == htons(ETH_P_IPV6)) {
net/batman-adv/multicast_forw.c
287
case htons(ETH_P_IP):
net/batman-adv/multicast_forw.c
292
case htons(ETH_P_IPV6):
net/batman-adv/multicast_forw.c
333
case htons(ETH_P_IP):
net/batman-adv/multicast_forw.c
338
case htons(ETH_P_IPV6):
net/batman-adv/multicast_forw.c
555
mcast_tracker->num_dests = htons(num_dests);
net/batman-adv/multicast_forw.c
563
tvlv_hdr->len = htons(tvlv_value_len);
net/batman-adv/multicast_forw.c
630
mcast_packet->tvlv_len = htons(tvlv_len);
net/batman-adv/multicast_forw.c
846
mcast_tracker->num_dests = htons(num_dests);
net/batman-adv/multicast_forw.c
851
tvlv_hdr->len = htons(ntohs(tvlv_hdr->len) - offset);
net/batman-adv/multicast_forw.c
855
mcast_packet->tvlv_len = htons(ntohs(mcast_packet->tvlv_len) - offset);
net/batman-adv/send.c
89
ethhdr->h_proto = htons(ETH_P_BATMAN);
net/batman-adv/send.c
92
skb->protocol = htons(ETH_P_BATMAN);
net/batman-adv/translation-table.c
2440
tmp_vid = htons(tt_common->vid);
net/batman-adv/translation-table.c
2499
tmp_vid = htons(tt_common->vid);
net/batman-adv/translation-table.c
2741
tt_change->vid = htons(tt_common_entry->vid);
net/batman-adv/translation-table.c
2896
tvlv_tt_data->num_vlan = htons(num_vlan);
net/batman-adv/translation-table.c
3489
tvlv_roam.vid = htons(vid);
net/batman-adv/translation-table.c
437
tt_change_node->change.vid = htons(common->vid);
net/batman-adv/translation-table.c
830
(*tt_data)->num_vlan = htons(num_vlan);
net/batman-adv/translation-table.c
834
tt_vlan->vid = htons(vlan->vid);
net/batman-adv/translation-table.c
909
(*tt_data)->num_vlan = htons(num_vlan);
net/batman-adv/translation-table.c
917
tt_vlan->vid = htons(vlan->vid);
net/batman-adv/tvlv.c
246
tvlv_new->tvlv_hdr.len = htons(tvlv_value_len);
net/batman-adv/tvlv.c
647
unicast_tvlv_packet->tvlv_len = htons(tvlv_len);
net/batman-adv/tvlv.c
656
tvlv_hdr->len = htons(tvlv_value_len);
net/bluetooth/6lowpan.c
295
local_skb->protocol = htons(ETH_P_IPV6);
net/bluetooth/6lowpan.c
326
local_skb->protocol = htons(ETH_P_IPV6);
net/bluetooth/bnep/core.c
84
rsp.resp = htons(resp);
net/bluetooth/bnep/netdev.c
101
r->len = htons(skb->len - len);
net/bluetooth/bnep/netdev.c
142
if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF))
net/bluetooth/bnep/netdev.c
80
r->len = htons(ETH_ALEN * 2);
net/bpf/test_run.c
1122
case htons(ETH_P_IP):
net/bpf/test_run.c
1130
case htons(ETH_P_IPV6):
net/bpf/test_run.c
1702
return htons(ETH_P_IP);
net/bpf/test_run.c
1707
return htons(ETH_P_IPV6);
net/bpf/test_run.c
1776
case htons(ETH_P_IP):
net/bpf/test_run.c
1780
case htons(ETH_P_IPV6):
net/bridge/br_arp_nd_proxy.c
143
if (parp->ar_pro != htons(ETH_P_IP) ||
net/bridge/br_arp_nd_proxy.c
164
parp->ar_op == htons(ARPOP_REQUEST))
net/bridge/br_arp_nd_proxy.c
166
if (parp->ar_op != htons(ARPOP_RREQUEST) &&
net/bridge/br_arp_nd_proxy.c
167
parp->ar_op != htons(ARPOP_RREPLY) &&
net/bridge/br_arp_nd_proxy.c
175
if (parp->ar_op != htons(ARPOP_REQUEST))
net/bridge/br_arp_nd_proxy.c
277
reply->protocol = htons(ETH_P_IPV6);
net/bridge/br_arp_nd_proxy.c
306
eth_hdr(reply)->h_proto = htons(ETH_P_IPV6);
net/bridge/br_arp_nd_proxy.c
307
reply->protocol = htons(ETH_P_IPV6);
net/bridge/br_arp_nd_proxy.c
345
pip6->payload_len = htons(sizeof(*na) + na_olen);
net/bridge/br_cfm.c
193
skb->protocol = htons(ETH_P_CFM);
net/bridge/br_cfm.c
200
eth_hdr->h_proto = htons(ETH_P_CFM);
net/bridge/br_device.c
73
(eth_hdr(skb)->h_proto == htons(ETH_P_ARP) ||
net/bridge/br_device.c
74
eth_hdr(skb)->h_proto == htons(ETH_P_RARP)) &&
net/bridge/br_device.c
78
skb->protocol == htons(ETH_P_IPV6) &&
net/bridge/br_input.c
170
(skb->protocol == htons(ETH_P_ARP) ||
net/bridge/br_input.c
171
skb->protocol == htons(ETH_P_RARP))) {
net/bridge/br_input.c
174
skb->protocol == htons(ETH_P_IPV6) &&
net/bridge/br_mdb.c
1277
if (cfg->entry->addr.proto == htons(ETH_P_IP) &&
net/bridge/br_mdb.c
158
case htons(ETH_P_IP):
net/bridge/br_mdb.c
164
case htons(ETH_P_IPV6):
net/bridge/br_mdb.c
195
case htons(ETH_P_IP):
net/bridge/br_mdb.c
203
case htons(ETH_P_IPV6):
net/bridge/br_mdb.c
256
if (mp->addr.proto == htons(ETH_P_IP)) {
net/bridge/br_mdb.c
259
} else if (mp->addr.proto == htons(ETH_P_IPV6)) {
net/bridge/br_mdb.c
279
case htons(ETH_P_IP):
net/bridge/br_mdb.c
289
case htons(ETH_P_IPV6):
net/bridge/br_mdb.c
472
case htons(ETH_P_IP):
net/bridge/br_mdb.c
481
case htons(ETH_P_IPV6):
net/bridge/br_mdb.c
673
case htons(ETH_P_IP):
net/bridge/br_mdb.c
684
case htons(ETH_P_IPV6): {
net/bridge/br_mrp.c
145
skb->protocol = htons(ETH_P_MRP);
net/bridge/br_mrp.c
152
eth_hdr->h_proto = htons(ETH_P_MRP);
net/bridge/br_multicast.c
1029
ihv3->nsrcs = htons(lmqt_srcs);
net/bridge/br_multicast.c
1125
skb->protocol = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
1132
eth->h_proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
1140
ip6h->payload_len = htons(8 + mld_hdr_size);
net/bridge/br_multicast.c
1178
mldq->mld_maxdelay = htons((u16)jiffies_to_msecs(interval));
net/bridge/br_multicast.c
1186
mld2q->mld2q_mrc = htons((u16)jiffies_to_msecs(interval));
net/bridge/br_multicast.c
1194
mld2q->mld2q_nsrcs = htons(llqt_srcs);
net/bridge/br_multicast.c
1248
case htons(ETH_P_IP):
net/bridge/br_multicast.c
1256
case htons(ETH_P_IPV6): {
net/bridge/br_multicast.c
126
br_dst.proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
1344
case htons(ETH_P_IP):
net/bridge/br_multicast.c
1350
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
1370
case htons(ETH_P_IP):
net/bridge/br_multicast.c
1376
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
141
br_dst.proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
1591
br_group.proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
1615
br_group.proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
167
case htons(ETH_P_IP):
net/bridge/br_multicast.c
1771
if (ip->proto == htons(ETH_P_IP))
net/bridge/br_multicast.c
180
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
1867
br_group.proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
1872
br_group.proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
1957
if (pg->key.addr.proto == htons(ETH_P_IP))
net/bridge/br_multicast.c
2244
if (pg->key.addr.proto == htons(ETH_P_IP))
net/bridge/br_multicast.c
2289
if (pg->key.addr.proto == htons(ETH_P_IP))
net/bridge/br_multicast.c
3116
case htons(ETH_P_IP):
net/bridge/br_multicast.c
3125
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
3527
saddr.proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
3615
saddr.proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
3772
br_group.proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
3797
br_group.proto = htons(ETH_P_IPV6);
net/bridge/br_multicast.c
3827
case htons(ETH_P_IP):
net/bridge/br_multicast.c
3831
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
4029
case htons(ETH_P_IP):
net/bridge/br_multicast.c
4033
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
4937
eth.h_proto = htons(proto);
net/bridge/br_multicast.c
5068
case htons(ETH_P_IP):
net/bridge/br_multicast.c
5103
case htons(ETH_P_IPV6):
net/bridge/br_multicast.c
920
__vlan_hwaccel_put_tag(skb, htons(vlan_proto), vlan->vid);
net/bridge/br_multicast.c
975
skb->protocol = htons(ETH_P_IP);
net/bridge/br_multicast.c
982
eth->h_proto = htons(ETH_P_IP);
net/bridge/br_multicast.c
987
iph->tot_len = htons(pkt_size - sizeof(*eth));
net/bridge/br_multicast.c
993
iph->frag_off = htons(IP_DF);
net/bridge/br_multicast_eht.c
384
case htons(ETH_P_IP):
net/bridge/br_multicast_eht.c
388
case htons(ETH_P_IPV6):
net/bridge/br_netfilter_hooks.c
103
return vlan_proto(skb) == htons(ETH_P_IPV6) &&
net/bridge/br_netfilter_hooks.c
111
return vlan_proto(skb) == htons(ETH_P_ARP) && brnet->filter_vlan_tagged;
net/bridge/br_netfilter_hooks.c
124
return skb->protocol == htons(ETH_P_PPP_SES) &&
net/bridge/br_netfilter_hooks.c
125
pppoe_proto(skb) == htons(PPP_IP) && brnet->filter_pppoe_tagged;
net/bridge/br_netfilter_hooks.c
133
return skb->protocol == htons(ETH_P_PPP_SES) &&
net/bridge/br_netfilter_hooks.c
134
pppoe_proto(skb) == htons(PPP_IPV6) &&
net/bridge/br_netfilter_hooks.c
260
skb->protocol = htons(ETH_P_8021Q);
net/bridge/br_netfilter_hooks.c
263
skb->protocol = htons(ETH_P_PPP_SES);
net/bridge/br_netfilter_hooks.c
462
if (skb->protocol == htons(ETH_P_8021Q))
net/bridge/br_netfilter_hooks.c
464
else if (skb->protocol == htons(ETH_P_PPP_SES))
net/bridge/br_netfilter_hooks.c
531
skb->protocol = htons(ETH_P_IP);
net/bridge/br_netfilter_hooks.c
641
if (skb->protocol == htons(ETH_P_IP))
net/bridge/br_netfilter_hooks.c
644
if (skb->protocol == htons(ETH_P_IPV6))
net/bridge/br_netfilter_hooks.c
703
skb->protocol = htons(ETH_P_IP);
net/bridge/br_netfilter_hooks.c
708
skb->protocol = htons(ETH_P_IPV6);
net/bridge/br_netfilter_hooks.c
73
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP))
net/bridge/br_netfilter_hooks.c
76
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6))
net/bridge/br_netfilter_hooks.c
79
(!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP))
net/bridge/br_netfilter_hooks.c
810
if (unlikely(((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) ||
net/bridge/br_netfilter_hooks.c
85
else if (skb->protocol == htons(ETH_P_8021Q))
net/bridge/br_netfilter_hooks.c
863
skb->protocol == htons(ETH_P_IP)) {
net/bridge/br_netfilter_hooks.c
892
skb->protocol == htons(ETH_P_IPV6)) {
net/bridge/br_netfilter_hooks.c
95
return vlan_proto(skb) == htons(ETH_P_IP) && brnet->filter_vlan_tagged;
net/bridge/br_netfilter_hooks.c
962
skb->protocol = htons(ETH_P_IP);
net/bridge/br_netfilter_hooks.c
964
skb->protocol = htons(ETH_P_IPV6);
net/bridge/br_netfilter_ipv6.c
181
skb->protocol = htons(ETH_P_IPV6);
net/bridge/br_private.h
1096
if (skb->protocol == htons(ETH_P_IPV6))
net/bridge/br_private.h
1108
if (skb->protocol == htons(ETH_P_IPV6))
net/bridge/br_private.h
1144
if (skb->protocol == htons(ETH_P_IP))
net/bridge/br_private.h
1146
else if (skb->protocol == htons(ETH_P_IPV6))
net/bridge/br_private.h
1183
case (htons(ETH_P_IP)):
net/bridge/br_private.h
1187
case (htons(ETH_P_IPV6)):
net/bridge/br_private.h
1199
case htons(ETH_P_IP):
net/bridge/br_private.h
1202
case htons(ETH_P_IPV6):
net/bridge/br_private.h
1215
case htons(ETH_P_IP):
net/bridge/br_private.h
1218
case htons(ETH_P_IPV6):
net/bridge/br_stp_bpdu.c
45
skb->protocol = htons(ETH_P_802_2);
net/bridge/br_switchdev.c
538
if (mp->addr.proto == htons(ETH_P_IP))
net/bridge/br_switchdev.c
541
else if (mp->addr.proto == htons(ETH_P_IPV6))
net/bridge/br_vlan.c
1016
if (!eth_type_vlan(htons(val)))
net/bridge/br_vlan.c
1019
return __br_vlan_set_proto(br, htons(val), extack);
net/bridge/br_vlan.c
1237
br->vlan_proto = htons(ETH_P_8021Q);
net/bridge/br_vlan.c
868
br->vlan_proto == htons(ETH_P_8021Q)) {
net/bridge/br_vlan.c
882
br->vlan_proto == htons(ETH_P_8021Q))
net/bridge/netfilter/ebt_among.c
104
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
net/bridge/netfilter/ebt_among.c
112
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
net/bridge/netfilter/ebt_among.c
73
if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) {
net/bridge/netfilter/ebt_among.c
81
} else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
net/bridge/netfilter/ebt_arp.c
106
if ((e->ethproto != htons(ETH_P_ARP) &&
net/bridge/netfilter/ebt_arp.c
107
e->ethproto != htons(ETH_P_RARP)) ||
net/bridge/netfilter/ebt_arp.c
43
if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP))
net/bridge/netfilter/ebt_arp.c
72
if (ah->ar_hln != ETH_ALEN || ah->ar_hrd != htons(ARPHRD_ETHER))
net/bridge/netfilter/ebt_arpreply.c
34
if (ap->ar_op != htons(ARPOP_REQUEST) ||
net/bridge/netfilter/ebt_arpreply.c
36
ap->ar_pro != htons(ETH_P_IP) ||
net/bridge/netfilter/ebt_arpreply.c
69
if (e->ethproto != htons(ETH_P_ARP) ||
net/bridge/netfilter/ebt_ip.c
109
if (e->ethproto != htons(ETH_P_IP) ||
net/bridge/netfilter/ebt_ip6.c
111
if (e->ethproto != htons(ETH_P_IPV6) || e->invflags & EBT_IPROTO)
net/bridge/netfilter/ebt_log.c
115
htons(ETH_P_IPV6)) {
net/bridge/netfilter/ebt_log.c
139
((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) ||
net/bridge/netfilter/ebt_log.c
140
(eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) {
net/bridge/netfilter/ebt_log.c
156
if (ah->ar_hrd == htons(1) &&
net/bridge/netfilter/ebt_log.c
98
htons(ETH_P_IP)) {
net/bridge/netfilter/ebt_snat.c
30
eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) {
net/bridge/netfilter/ebt_vlan.c
83
if (e->ethproto != htons(ETH_P_8021Q)) {
net/bridge/netfilter/ebtables.c
139
ethproto = htons(ETH_P_8021Q);
net/bridge/netfilter/nf_conntrack_bridge.c
254
case htons(ETH_P_IP):
net/bridge/netfilter/nf_conntrack_bridge.c
268
case htons(ETH_P_IPV6):
net/bridge/netfilter/nf_conntrack_bridge.c
349
case htons(ETH_P_IP):
net/bridge/netfilter/nf_conntrack_bridge.c
352
case htons(ETH_P_IPV6):
net/bridge/netfilter/nft_meta_bridge.c
59
nft_reg_store_be16(dest, htons(p_proto));
net/bridge/netfilter/nft_reject_bridge.c
122
case htons(ETH_P_IP):
net/bridge/netfilter/nft_reject_bridge.c
143
case htons(ETH_P_IPV6):
net/caif/caif_dev.c
181
skb->protocol = htons(ETH_P_CAIF);
net/caif/caif_usb.c
60
skb->protocol = htons(ETH_P_IP);
net/caif/chnl_net.c
85
skb->protocol = htons(ETH_P_IP);
net/caif/chnl_net.c
88
skb->protocol = htons(ETH_P_IPV6);
net/can/af_can.c
209
skb->protocol = htons(ETH_P_CANXL);
net/can/af_can.c
211
skb->protocol = htons(ETH_P_CAN);
net/can/af_can.c
215
skb->protocol = htons(ETH_P_CANFD);
net/ceph/messenger.c
1210
put_unaligned(htons(p), &((struct sockaddr_in *)&addr->in_addr)->sin_port);
net/ceph/messenger.c
1213
put_unaligned(htons(p), &((struct sockaddr_in6 *)&addr->in_addr)->sin6_port);
net/core/dev.c
3668
if (type == htons(ETH_P_TEB)) {
net/core/dev.c
3777
vlan_get_protocol(skb) == htons(ETH_P_IPV6))) &&
net/core/dev.c
3832
if (!iph || !(iph->frag_off & htons(IP_DF)))
net/core/dev.c
3942
if (vlan_get_protocol(skb) == htons(ETH_P_IPV6) &&
net/core/dev.c
5921
case htons(ETH_P_ARP):
net/core/dev.c
5922
case htons(ETH_P_IP):
net/core/dev.c
5923
case htons(ETH_P_IPV6):
net/core/dev.c
5924
case htons(ETH_P_8021Q):
net/core/dev.c
5925
case htons(ETH_P_8021AD):
net/core/dev.c
596
if (pt->type == htons(ETH_P_ALL)) {
net/core/filter.c
12250
case htons(ETH_P_IP):
net/core/filter.c
12255
case htons(ETH_P_IPV6):
net/core/filter.c
2439
if (skb->protocol == htons(ETH_P_IP))
net/core/filter.c
2441
else if (skb->protocol == htons(ETH_P_IPV6))
net/core/filter.c
3219
if (unlikely(vlan_proto != htons(ETH_P_8021Q) &&
net/core/filter.c
3220
vlan_proto != htons(ETH_P_8021AD)))
net/core/filter.c
3221
vlan_proto = htons(ETH_P_8021Q);
net/core/filter.c
3262
skb->protocol = htons(proto);
net/core/filter.c
3406
if (from_proto == htons(ETH_P_IP) &&
net/core/filter.c
3407
to_proto == htons(ETH_P_IPV6))
net/core/filter.c
3410
if (from_proto == htons(ETH_P_IPV6) &&
net/core/filter.c
3411
to_proto == htons(ETH_P_IP))
net/core/filter.c
3478
case htons(ETH_P_IP):
net/core/filter.c
3480
case htons(ETH_P_IPV6):
net/core/filter.c
3524
if (skb->protocol != htons(ETH_P_IP) &&
net/core/filter.c
3525
skb->protocol != htons(ETH_P_IPV6))
net/core/filter.c
3560
skb_set_inner_protocol(skb, htons(ETH_P_TEB));
net/core/filter.c
3586
if (skb->protocol == htons(ETH_P_IP) &&
net/core/filter.c
3589
else if (skb->protocol == htons(ETH_P_IPV6) &&
net/core/filter.c
3642
if (skb->protocol == htons(ETH_P_IP) &&
net/core/filter.c
3645
else if (skb->protocol == htons(ETH_P_IPV6) &&
net/core/filter.c
3723
if (unlikely(proto != htons(ETH_P_IP) &&
net/core/filter.c
3724
proto != htons(ETH_P_IPV6)))
net/core/filter.c
6001
if (((struct sockaddr_in *)addr)->sin_port == htons(0))
net/core/filter.c
6008
if (((struct sockaddr_in6 *)addr)->sin6_port == htons(0))
net/core/filter.c
6596
if (skb->protocol != htons(ETH_P_IPV6))
net/core/filter.c
6853
hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/core/filter.c
7963
if (skb->protocol != htons(ETH_P_IP) &&
net/core/filter.c
7964
skb->protocol != htons(ETH_P_IPV6))
net/core/flow_dissector.c
1084
proto == htons(ETH_P_XDSA))) {
net/core/flow_dissector.c
1199
case htons(ETH_P_IP): {
net/core/flow_dissector.c
1232
if (iph->frag_off & htons(IP_OFFSET)) {
net/core/flow_dissector.c
1247
case htons(ETH_P_IPV6): {
net/core/flow_dissector.c
1297
case htons(ETH_P_8021AD):
net/core/flow_dissector.c
1298
case htons(ETH_P_8021Q): {
net/core/flow_dissector.c
1359
case htons(ETH_P_PPP_SES): {
net/core/flow_dissector.c
1389
proto = htons(ETH_P_IP);
net/core/flow_dissector.c
1392
proto = htons(ETH_P_IPV6);
net/core/flow_dissector.c
1395
proto = htons(ETH_P_MPLS_UC);
net/core/flow_dissector.c
1398
proto = htons(ETH_P_MPLS_MC);
net/core/flow_dissector.c
1415
key_pppoe->ppp_proto = htons(ppp_proto);
net/core/flow_dissector.c
1416
key_pppoe->type = htons(ETH_P_PPP_SES);
net/core/flow_dissector.c
1420
case htons(ETH_P_TIPC): {
net/core/flow_dissector.c
1442
case htons(ETH_P_MPLS_UC):
net/core/flow_dissector.c
1443
case htons(ETH_P_MPLS_MC):
net/core/flow_dissector.c
1451
case htons(ETH_P_FCOE):
net/core/flow_dissector.c
1461
case htons(ETH_P_ARP):
net/core/flow_dissector.c
1462
case htons(ETH_P_RARP):
net/core/flow_dissector.c
1468
case htons(ETH_P_BATMAN):
net/core/flow_dissector.c
1473
case htons(ETH_P_1588): {
net/core/flow_dissector.c
1488
case htons(ETH_P_PRP):
net/core/flow_dissector.c
1489
case htons(ETH_P_HSR): {
net/core/flow_dissector.c
1505
case htons(ETH_P_CFM):
net/core/flow_dissector.c
1552
if (proto != htons(ETH_P_IPV6))
net/core/flow_dissector.c
1571
if (proto != htons(ETH_P_IPV6))
net/core/flow_dissector.c
1587
if (!(fh->frag_off & htons(IP6_OFFSET))) {
net/core/flow_dissector.c
1604
proto = htons(ETH_P_IP);
net/core/flow_dissector.c
1621
proto = htons(ETH_P_IPV6);
net/core/flow_dissector.c
1634
proto = htons(ETH_P_MPLS_UC);
net/core/flow_dissector.c
596
if (arp->ar_hrd != htons(ARPHRD_ETHER) ||
net/core/flow_dissector.c
597
arp->ar_pro != htons(ETH_P_IP) ||
net/core/flow_dissector.c
600
(arp->ar_op != htons(ARPOP_REPLY) &&
net/core/flow_dissector.c
601
arp->ar_op != htons(ARPOP_REQUEST)))
net/core/flow_dissector.c
719
if (*p_proto == htons(ETH_P_TEB)) {
net/core/flow_dissector.c
753
*p_proto = htons(ETH_P_IP);
net/core/flow_dissector.c
756
*p_proto = htons(ETH_P_IPV6);
net/core/flow_dissector.c
847
key_tcp->flags = (*(__be16 *) &tcp_flag_word(th) & htons(0x0FFF));
net/core/lwt_bpf.c
104
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/core/lwt_bpf.c
188
if (skb->protocol == htons(ETH_P_IP))
net/core/lwt_bpf.c
190
else if (skb->protocol == htons(ETH_P_IPV6))
net/core/lwt_bpf.c
641
skb->protocol = htons(ETH_P_IP);
net/core/lwt_bpf.c
648
skb->protocol = htons(ETH_P_IPV6);
net/core/lwt_bpf.c
94
if (skb->protocol == htons(ETH_P_IP)) {
net/core/net-procfs.c
306
if (pt->type == htons(ETH_P_ALL))
net/core/net_test.c
23
skb->protocol = htons(ETH_P_ATALK);
net/core/netpoll.c
428
ip6h->payload_len = htons(sizeof(struct udphdr) + len);
net/core/netpoll.c
434
skb->protocol = htons(ETH_P_IPV6);
net/core/netpoll.c
452
put_unaligned(htons(ip_len), &iph->tot_len);
net/core/netpoll.c
453
iph->id = htons(atomic_inc_return(&ip_ident));
net/core/netpoll.c
461
skb->protocol = htons(ETH_P_IP);
net/core/netpoll.c
475
udph->source = htons(np->local_port);
net/core/netpoll.c
476
udph->dest = htons(np->remote_port);
net/core/netpoll.c
477
udph->len = htons(udp_len);
net/core/netpoll.c
491
eth->h_proto = htons(ETH_P_IPV6);
net/core/netpoll.c
493
eth->h_proto = htons(ETH_P_IP);
net/core/pktgen.c
2792
iph->tot_len = htons(skb->len - ETH_HLEN);
net/core/pktgen.c
2817
return htons(id | (cfi << 12) | (prio << 13));
net/core/pktgen.c
2935
__be16 protocol = htons(ETH_P_IP);
net/core/pktgen.c
2944
protocol = htons(ETH_P_MPLS_UC);
net/core/pktgen.c
2947
protocol = htons(ETH_P_8021Q);
net/core/pktgen.c
2978
*svlan_encapsulated_proto = htons(ETH_P_8021Q);
net/core/pktgen.c
2985
*vlan_encapsulated_proto = htons(ETH_P_IP);
net/core/pktgen.c
3006
udph->source = htons(pkt_dev->cur_udp_src);
net/core/pktgen.c
3007
udph->dest = htons(pkt_dev->cur_udp_dst);
net/core/pktgen.c
3008
udph->len = htons(datalen + 8); /* DATA + udphdr */
net/core/pktgen.c
3018
iph->id = htons(pkt_dev->ip_id);
net/core/pktgen.c
3022
iph->tot_len = htons(iplen);
net/core/pktgen.c
3063
__be16 protocol = htons(ETH_P_IPV6);
net/core/pktgen.c
3072
protocol = htons(ETH_P_MPLS_UC);
net/core/pktgen.c
3075
protocol = htons(ETH_P_8021Q);
net/core/pktgen.c
3106
*svlan_encapsulated_proto = htons(ETH_P_8021Q);
net/core/pktgen.c
3113
*vlan_encapsulated_proto = htons(ETH_P_IPV6);
net/core/pktgen.c
3139
udph->source = htons(pkt_dev->cur_udp_src);
net/core/pktgen.c
3140
udph->dest = htons(pkt_dev->cur_udp_dst);
net/core/pktgen.c
3141
udph->len = htons(udplen);
net/core/pktgen.c
3153
iph->payload_len = htons(udplen);
net/core/rtnetlink.c
1554
ivi.vlan_proto = htons(ETH_P_8021Q);
net/core/rtnetlink.c
2809
htons(ETH_P_8021Q));
net/core/rtnetlink.c
6580
if (entry->addr.proto != htons(ETH_P_IP) &&
net/core/rtnetlink.c
6581
entry->addr.proto != htons(ETH_P_IPV6) &&
net/core/rtnetlink.c
6652
if (entry->addr.proto == htons(ETH_P_IP)) {
net/core/rtnetlink.c
6663
} else if (entry->addr.proto == htons(ETH_P_IPV6)) {
net/core/selftests.c
151
skb->protocol = htons(ETH_P_IP);
net/core/selftests.c
202
if (thdr->dest != htons(tpriv->packet->dport))
net/core/selftests.c
211
if (uhdr->dest != htons(tpriv->packet->dport))
net/core/selftests.c
247
tpriv->pt.type = htons(ETH_P_IP);
net/core/selftests.c
65
ehdr->h_proto = htons(ETH_P_IP);
net/core/selftests.c
69
thdr->source = htons(attr->sport);
net/core/selftests.c
70
thdr->dest = htons(attr->dport);
net/core/selftests.c
73
uhdr->source = htons(attr->sport);
net/core/selftests.c
74
uhdr->dest = htons(attr->dport);
net/core/selftests.c
75
uhdr->len = htons(sizeof(*shdr) + sizeof(*uhdr) + attr->size);
net/core/selftests.c
77
uhdr->len = htons(attr->max_size -
net/core/selftests.c
98
ihdr->tot_len = htons(iplen);
net/core/skbuff.c
5992
if (hp->frag_off & htons(IP6_OFFSET | IP6_MF))
net/core/skbuff.c
6034
case htons(ETH_P_IP):
net/core/skbuff.c
6038
case htons(ETH_P_IPV6):
net/core/tso.c
18
iph->id = htons(tso->ip_id);
net/core/tso.c
19
iph->tot_len = htons(size + hdr_len - mac_hdr_len);
net/core/tso.c
24
iph->payload_len = htons(size + tso->tlen);
net/core/tso.c
41
uh->len = htons(sizeof(*uh) + size);
net/core/tso.c
73
tso->ipv6 = vlan_get_protocol(skb) == htons(ETH_P_IPV6);
net/core/utils.c
316
addr4->sin_port = htons(port_num);
net/core/utils.c
355
addr6->sin6_port = htons(port_num);
net/dsa/port.c
1329
vlan_vid_add(conduit, htons(ETH_P_8021Q), vlan->vid);
net/dsa/port.c
1348
vlan_vid_del(conduit, htons(ETH_P_8021Q), vlan->vid);
net/dsa/tag.h
120
if (vid != pvid || skb->vlan_proto != htons(proto))
net/dsa/tag.h
132
upper_dev = __vlan_find_dev_deep_rcu(br, htons(proto), vid);
net/dsa/tag.h
165
if (!skb_vlan_tag_present(skb) && skb->protocol == htons(proto)) {
net/dsa/tag.h
73
if (vid == pvid && skb->vlan_proto == htons(proto))
net/dsa/tag_8021q.c
470
return vlan_insert_tag(skb, htons(tpid), tci);
net/dsa/tag_brcm.c
248
if (proto[0] == htons(ETH_P_8021Q) && proto[1] == 0)
net/dsa/tag_dsa.c
164
if (skb->protocol == htons(ETH_P_8021Q) &&
net/dsa/tag_lan9303.c
74
lan9303_tag[0] = htons(ETH_P_8021Q);
net/dsa/tag_lan9303.c
75
lan9303_tag[1] = htons(tag);
net/dsa/tag_mtk.c
39
case htons(ETH_P_8021Q):
net/dsa/tag_mtk.c
42
case htons(ETH_P_8021AD):
net/dsa/tag_mxl-gsw1xx.c
57
gsw1xx_tag[0] = htons(ETH_P_MXLGSW);
net/dsa/tag_mxl-gsw1xx.c
61
gsw1xx_tag[1] = htons(tag);
net/dsa/tag_mxl862xx.c
51
mxl862_tag[0] = htons(ETH_P_MXLGSW);
net/dsa/tag_mxl862xx.c
53
mxl862_tag[2] = htons(FIELD_PREP(MXL862_SUBIF_ID, sub_interface));
net/dsa/tag_mxl862xx.c
54
mxl862_tag[3] = htons(FIELD_PREP(MXL862_IGP_EGP, cpu_port));
net/dsa/tag_mxl862xx.c
72
if (unlikely(mxl862_tag[0] != htons(ETH_P_MXLGSW))) {
net/dsa/tag_ocelot.c
142
eth_hdr(skb)->h_proto == htons(vlan_tpid)) {
net/dsa/tag_ocelot.c
148
__vlan_hwaccel_put_tag(skb, htons(vlan_tpid), vlan_tci);
net/dsa/tag_qca.c
30
*phdr = htons(hdr);
net/dsa/tag_rtl4_a.c
56
*p = htons(ETH_P_REALTEK);
net/dsa/tag_rtl4_a.c
63
*p = htons(out);
net/dsa/tag_rtl8_4.c
109
tag16[0] = htons(ETH_P_REALTEK);
net/dsa/tag_rtl8_4.c
112
tag16[1] = htons(FIELD_PREP(RTL8_4_PROTOCOL, RTL8_4_PROTOCOL_RTL8365MB));
net/dsa/tag_rtl8_4.c
115
tag16[2] = htons(FIELD_PREP(RTL8_4_LEARN_DIS, 1));
net/dsa/tag_rtl8_4.c
118
tag16[3] = htons(FIELD_PREP(RTL8_4_RX, dsa_xmit_port_mask(skb, dev)));
net/dsa/tag_rzn1_a5psw.c
63
ptag->ctrl_tag = htons(ETH_P_DSA_A5PSW);
net/dsa/tag_rzn1_a5psw.c
64
ptag->ctrl_data = htons(A5PSW_CTRL_DATA_FORCE_FORWARD);
net/dsa/tag_rzn1_a5psw.c
65
ptag->ctrl_data2_lo = htons(data2_val);
net/dsa/tag_rzn1_a5psw.c
85
if (tag->ctrl_tag != htons(ETH_P_DSA_A5PSW)) {
net/dsa/tag_sja1105.c
243
__be16 xmit_tpid = htons(sja1105_xmit_tpid(dp));
net/dsa/tag_sja1105.c
329
tx_header[0] = htons(ETH_P_SJA1110);
net/dsa/tag_sja1105.c
330
tx_header[1] = htons(SJA1110_HEADER_HOST_TO_SWITCH |
net/dsa/tag_sja1105.c
339
tx_header[1] |= htons(SJA1110_TX_HEADER_TAKE_TS);
net/dsa/tag_yt921x.c
69
tag[0] = htons(ETH_P_YT921X);
net/dsa/tag_yt921x.c
74
tag[2] = htons(ctrl);
net/dsa/tag_yt921x.c
77
tag[3] = htons(ctrl);
net/dsa/tag_yt921x.c
94
if (unlikely(tag[0] != htons(ETH_P_YT921X))) {
net/dsa/user.c
1382
if (cls->common.protocol != htons(ETH_P_ALL)) {
net/dsa/user.c
1924
__be16 proto = vdev ? vlan_dev_vlan_proto(vdev) : htons(ETH_P_8021Q);
net/dsa/user.c
1931
__be16 proto = vdev ? vlan_dev_vlan_proto(vdev) : htons(ETH_P_8021Q);
net/ethernet/eth.c
174
return htons(ETH_P_XDSA);
net/ethernet/eth.c
188
res = (sap && *sap == 0xFFFF) ? htons(ETH_P_802_3) : htons(ETH_P_802_2);
net/ethernet/eth.c
222
if (type == htons(ETH_P_802_3))
net/ethernet/eth.c
86
eth->h_proto = htons(type);
net/ethernet/eth.c
88
eth->h_proto = htons(len);
net/ethtool/ioctl.c
3645
match->mask.basic.n_proto = htons(0xffff);
net/ethtool/ioctl.c
3676
match->key.basic.n_proto = htons(ETH_P_IP);
net/ethtool/ioctl.c
3725
match->key.basic.n_proto = htons(ETH_P_IPV6);
net/ethtool/ioctl.c
3811
!!(ext_h_spec->vlan_tci & htons(0x1000));
net/ethtool/ioctl.c
3813
!!(ext_m_spec->vlan_tci & htons(0x1000));
net/ethtool/tunnels.c
143
htons(IANA_VXLAN_UDP_PORT)) ||
net/hsr/hsr_device.c
332
hsr_stag->sequence_nr = htons(hsr->sup_sequence_nr);
net/hsr/hsr_device.c
335
hsr_stag->sequence_nr = htons(hsr->sequence_nr);
net/hsr/hsr_device.c
391
hsr_stag->sequence_nr = htons(hsr->sup_sequence_nr);
net/hsr/hsr_forward.c
130
if (eth_hdr->h_proto == htons(ETH_P_HSR))
net/hsr/hsr_forward.c
260
trailer->sequence_nr = htons(frame->sequence_nr);
net/hsr/hsr_forward.c
261
trailer->PRP_suffix = htons(ETH_P_PRP);
net/hsr/hsr_forward.c
319
hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr);
net/hsr/hsr_forward.c
321
hsr_ethhdr->ethhdr.h_proto = htons(proto_version ?
net/hsr/hsr_forward.c
52
if (!(eth_hdr->h_proto == htons(ETH_P_PRP) ||
net/hsr/hsr_forward.c
53
eth_hdr->h_proto == htons(ETH_P_HSR)))
net/hsr/hsr_forward.c
57
if (eth_hdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */
net/hsr/hsr_forward.c
63
if (hsr_V1_hdr->hsr.encap_proto != htons(ETH_P_PRP))
net/hsr/hsr_forward.c
637
if ((!hsr->prot_version && proto == htons(ETH_P_PRP)) ||
net/hsr/hsr_forward.c
638
proto == htons(ETH_P_HSR)) {
net/hsr/hsr_forward.c
709
if (proto == htons(ETH_P_8021Q))
net/hsr/hsr_framereg.c
296
if (ethhdr->h_proto == htons(ETH_P_PRP) ||
net/hsr/hsr_framereg.c
297
ethhdr->h_proto == htons(ETH_P_HSR)) {
net/hsr/hsr_framereg.c
410
if (ethhdr->h_proto == htons(ETH_P_HSR)) {
net/hsr/hsr_main.h
143
rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) &
net/hsr/hsr_main.h
148
rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) &
net/hsr/hsr_main.h
247
if (rct->PRP_suffix == htons(ETH_P_PRP))
net/hsr/hsr_main.h
272
if (ethhdr->h_proto == htons(ETH_P_8021Q))
net/hsr/hsr_main.h
66
htons((ntohs(ht->path_and_LSDU_size) & 0x0FFF) | (path << 12));
net/hsr/hsr_main.h
71
ht->path_and_LSDU_size = htons((ntohs(ht->path_and_LSDU_size) &
net/hsr/hsr_slave.c
21
return (protocol != htons(ETH_P_PRP) && protocol != htons(ETH_P_HSR));
net/hsr/hsr_slave.c
65
if ((!hsr->prot_version && protocol == htons(ETH_P_PRP)) ||
net/hsr/hsr_slave.c
66
protocol == htons(ETH_P_HSR)) {
net/ieee802154/6lowpan/rx.c
23
skb->protocol = htons(ETH_P_IPV6);
net/ieee802154/6lowpan/rx.c
311
.type = htons(ETH_P_IEEE802154),
net/ieee802154/6lowpan/tx.c
167
frag_tag = htons(lowpan_802154_dev(ldev)->fragment_tag);
net/ieee802154/socket.c
1097
.type = htons(ETH_P_IEEE802154),
net/ieee802154/socket.c
297
skb->protocol = htons(ETH_P_IEEE802154);
net/ieee802154/socket.c
687
skb->protocol = htons(ETH_P_IEEE802154);
net/ife/ife.c
60
ifehdr->metalen = htons(metalen);
net/ipv4/af_inet.c
1431
iph->frag_off = htons(offset >> 3);
net/ipv4/af_inet.c
1433
iph->frag_off |= htons(IP_MF);
net/ipv4/af_inet.c
1438
iph->id = htons(id);
net/ipv4/af_inet.c
1450
iph->id = htons(id++);
net/ipv4/af_inet.c
1453
iph->tot_len = htons(tot_len);
net/ipv4/af_inet.c
193
inet->inet_sport = htons(inet->inet_num);
net/ipv4/af_inet.c
384
inet->inet_sport = htons(inet->inet_num);
net/ipv4/af_inet.c
564
inet->inet_sport = htons(inet->inet_num);
net/ipv4/ah4.c
207
top_iph->tot_len = htons(skb->len);
net/ipv4/arp.c
570
skb->protocol = htons(ETH_P_ARP);
net/ipv4/arp.c
595
arp->ar_hrd = htons(dev->type);
net/ipv4/arp.c
596
arp->ar_pro = htons(ETH_P_IP);
net/ipv4/arp.c
601
arp->ar_hrd = htons(ARPHRD_AX25);
net/ipv4/arp.c
602
arp->ar_pro = htons(AX25_P_IP);
net/ipv4/arp.c
607
arp->ar_hrd = htons(ARPHRD_NETROM);
net/ipv4/arp.c
608
arp->ar_pro = htons(AX25_P_IP);
net/ipv4/arp.c
615
arp->ar_hrd = htons(ARPHRD_ETHER);
net/ipv4/arp.c
616
arp->ar_pro = htons(ETH_P_IP);
net/ipv4/arp.c
623
arp->ar_op = htons(type);
net/ipv4/arp.c
683
if (is_garp && ar_op == htons(ARPOP_REPLY))
net/ipv4/arp.c
730
if (arp->ar_pro != htons(ETH_P_IP) ||
net/ipv4/arp.c
731
htons(dev_type) != arp->ar_hrd)
net/ipv4/arp.c
746
if ((arp->ar_hrd != htons(ARPHRD_ETHER) &&
net/ipv4/arp.c
747
arp->ar_hrd != htons(ARPHRD_IEEE802)) ||
net/ipv4/arp.c
748
arp->ar_pro != htons(ETH_P_IP))
net/ipv4/arp.c
752
if (arp->ar_pro != htons(AX25_P_IP) ||
net/ipv4/arp.c
753
arp->ar_hrd != htons(ARPHRD_AX25))
net/ipv4/arp.c
757
if (arp->ar_pro != htons(AX25_P_IP) ||
net/ipv4/arp.c
758
arp->ar_hrd != htons(ARPHRD_NETROM))
net/ipv4/arp.c
765
if (arp->ar_op != htons(ARPOP_REPLY) &&
net/ipv4/arp.c
766
arp->ar_op != htons(ARPOP_REQUEST))
net/ipv4/arp.c
826
if (arp->ar_op == htons(ARPOP_REQUEST) && skb_metadata_dst(skb))
net/ipv4/arp.c
833
if (arp->ar_op == htons(ARPOP_REQUEST) &&
net/ipv4/arp.c
841
if (arp->ar_op == htons(ARPOP_REQUEST) &&
net/ipv4/arp.c
908
(arp->ar_op == htons(ARPOP_REPLY) &&
net/ipv4/arp.c
934
if (arp->ar_op != htons(ARPOP_REPLY) ||
net/ipv4/cipso_ipv4.c
1080
*((__be16 *)&net_cat[iter]) = htons(array[--array_cnt]);
net/ipv4/cipso_ipv4.c
1084
*((__be16 *)&net_cat[iter]) = htons(array[array_cnt]);
net/ipv4/cipso_ipv4.c
953
*((__be16 *)&net_cat[cat_iter]) = htons(cat);
net/ipv4/esp4.c
323
uh->len = htons(len);
net/ipv4/esp4.c
359
*lenp = htons(len);
net/ipv4/esp4_offload.c
127
__be16 type = inner_mode->family == AF_INET6 ? htons(ETH_P_IPV6)
net/ipv4/esp4_offload.c
128
: htons(ETH_P_IP);
net/ipv4/esp4_offload.c
351
ip_hdr(skb)->tot_len = htons(skb->len);
net/ipv4/fou_core.c
1014
pd[0] = htons(csum_start);
net/ipv4/fou_core.c
1015
pd[1] = htons(csum_start + skb->csum_offset);
net/ipv4/fou_core.c
1046
uh->len = htons(skb->len);
net/ipv4/fou_core.c
183
ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(skb)->tot_len) - len);
net/ipv4/fou_core.c
186
htons(ntohs(ipv6_hdr(skb)->payload_len) - len);
net/ipv4/fou_core.c
62
ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(skb)->tot_len) - len);
net/ipv4/fou_core.c
65
htons(ntohs(ipv6_hdr(skb)->payload_len) - len);
net/ipv4/gre_demux.c
114
if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) {
net/ipv4/gre_demux.c
131
if ((greh->protocol == htons(ETH_P_ERSPAN) && hdr_len != 4) ||
net/ipv4/gre_demux.c
132
greh->protocol == htons(ETH_P_ERSPAN2)) {
net/ipv4/icmp.c
1297
icmphdr->un.echo.sequence &= htons(0xFF00);
net/ipv4/icmp.c
1376
icmphdr->un.echo.sequence |= htons(status);
net/ipv4/icmp.c
700
addr4_subobj->afi = htons(ICMP_AFI_IP);
net/ipv4/icmp.c
716
objh->length = htons(skb_tail_pointer(skb) - (unsigned char *)objh);
net/ipv4/icmp.c
860
if (iph->frag_off & htons(IP_OFFSET))
net/ipv4/igmp.c
396
pip->frag_off = htons(IP_DF);
net/ipv4/igmp.c
456
pih->ngrec = htons(ntohs(pih->ngrec)+1);
net/ipv4/igmp.c
537
pgr->grec_nsrcs = htons(scount);
net/ipv4/igmp.c
584
pgr->grec_nsrcs = htons(scount);
net/ipv4/igmp.c
781
iph->frag_off = htons(IP_DF);
net/ipv4/inet_connection_sock.c
1213
newinet->inet_sport = htons(ireq->ir_num);
net/ipv4/inet_connection_sock.c
1345
inet->inet_sport = htons(inet->inet_num);
net/ipv4/inet_connection_sock.c
777
htons(ireq->ir_num), sk_uid(sk));
net/ipv4/inet_connection_sock.c
814
htons(ireq->ir_num), sk_uid(sk));
net/ipv4/inet_diag.c
76
r->id.idiag_sport = htons(READ_ONCE(sk->sk_num));
net/ipv4/inet_hashtables.c
1183
inet_sk(sk)->inet_sport = htons(port);
net/ipv4/inet_hashtables.c
629
inet->inet_sport = htons(lport);
net/ipv4/ip_forward.c
48
if (unlikely((ip_hdr(skb)->frag_off & htons(IP_DF)) == 0))
net/ipv4/ip_fragment.c
358
if (ip_hdr(skb)->frag_off & htons(IP_DF) &&
net/ipv4/ip_fragment.c
435
iph->tot_len = htons(len);
net/ipv4/ip_fragment.c
448
iph->frag_off = htons(IP_DF);
net/ipv4/ip_fragment.c
512
if (skb->protocol != htons(ETH_P_IP))
net/ipv4/ip_gre.c
1228
parms->iph.frag_off = htons(IP_DF);
net/ipv4/ip_gre.c
1239
&& (parms->iph.frag_off & htons(IP_DF)))
net/ipv4/ip_gre.c
146
if (tpi->proto == htons(ETH_P_TEB))
net/ipv4/ip_gre.c
148
else if (tpi->proto == htons(ETH_P_ERSPAN) ||
net/ipv4/ip_gre.c
149
tpi->proto == htons(ETH_P_ERSPAN2))
net/ipv4/ip_gre.c
1574
!!(p->iph.frag_off & htons(IP_DF))) ||
net/ipv4/ip_gre.c
191
if (tpi->proto == htons(ETH_P_IPV6)) {
net/ipv4/ip_gre.c
240
if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP),
net/ipv4/ip_gre.c
314
htons(ETH_P_TEB),
net/ipv4/ip_gre.c
424
if (tpi->proto == htons(ETH_P_TEB))
net/ipv4/ip_gre.c
430
if (res == PACKET_NEXT && tpi->proto == htons(ETH_P_TEB)) {
net/ipv4/ip_gre.c
454
hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IP), 0);
net/ipv4/ip_gre.c
458
if (unlikely(tpi.proto == htons(ETH_P_ERSPAN) ||
net/ipv4/ip_gre.c
459
tpi.proto == htons(ETH_P_ERSPAN2))) {
net/ipv4/ip_gre.c
584
if (skb->protocol == htons(ETH_P_IP) &&
net/ipv4/ip_gre.c
588
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv4/ip_gre.c
602
proto = htons(ETH_P_ERSPAN);
net/ipv4/ip_gre.c
609
proto = htons(ETH_P_ERSPAN2);
net/ipv4/ip_gre.c
732
proto = htons(ETH_P_ERSPAN);
net/ipv4/ip_gre.c
738
proto = htons(ETH_P_ERSPAN);
net/ipv4/ip_gre.c
743
proto = htons(ETH_P_ERSPAN2);
net/ipv4/ip_gre.c
767
gre_fb_xmit(skb, dev, htons(ETH_P_TEB));
net/ipv4/ip_gre.c
778
__gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB));
net/ipv4/ip_gre.c
832
p->iph.ihl != 5 || (p->iph.frag_off & htons(~IP_DF)) ||
net/ipv4/ip_gre.c
907
greh->protocol = htons(type);
net/ipv4/ip_output.c
118
skb->protocol = htons(ETH_P_IP);
net/ipv4/ip_output.c
1444
df = htons(IP_DF);
net/ipv4/ip_output.c
173
iph->frag_off = htons(IP_DF);
net/ipv4/ip_output.c
377
skb->protocol = htons(ETH_P_IP);
net/ipv4/ip_output.c
436
skb->protocol = htons(ETH_P_IP);
net/ipv4/ip_output.c
511
*((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (tos & 0xff));
net/ipv4/ip_output.c
513
iph->frag_off = htons(IP_DF);
net/ipv4/ip_output.c
582
if ((iph->frag_off & htons(IP_DF)) == 0)
net/ipv4/ip_output.c
612
iph->tot_len = htons(first_len);
net/ipv4/ip_output.c
613
iph->frag_off = htons(IP_MF);
net/ipv4/ip_output.c
632
iph->tot_len = htons(frag->len);
net/ipv4/ip_output.c
635
iph->frag_off = htons(iter->offset >> 3);
net/ipv4/ip_output.c
637
iph->frag_off |= htons(IP_MF);
net/ipv4/ip_output.c
658
state->not_last_frag = iph->frag_off & htons(IP_MF);
net/ipv4/ip_output.c
733
iph->frag_off = htons((state->offset >> 3));
net/ipv4/ip_output.c
735
iph->frag_off |= htons(IP_DF);
net/ipv4/ip_output.c
742
iph->frag_off |= htons(IP_MF);
net/ipv4/ip_output.c
746
iph->tot_len = htons(len + state->hlen);
net/ipv4/ip_tunnel.c
535
if (skb->protocol == htons(ETH_P_IP)) {
net/ipv4/ip_tunnel.c
537
(inner_iph->frag_off & htons(IP_DF)) &&
net/ipv4/ip_tunnel.c
544
else if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv4/ip_tunnel.c
594
if (skb->protocol == htons(ETH_P_IP))
net/ipv4/ip_tunnel.c
596
else if (skb->protocol == htons(ETH_P_IPV6))
net/ipv4/ip_tunnel.c
630
df = htons(IP_DF);
net/ipv4/ip_tunnel.c
640
if (skb->protocol == htons(ETH_P_IP))
net/ipv4/ip_tunnel.c
642
else if (skb->protocol == htons(ETH_P_IPV6))
net/ipv4/ip_tunnel.c
708
} else if (payload_protocol == htons(ETH_P_IP)) {
net/ipv4/ip_tunnel.c
713
else if (payload_protocol == htons(ETH_P_IPV6)) {
net/ipv4/ip_tunnel.c
753
if (payload_protocol == htons(ETH_P_IP)) {
net/ipv4/ip_tunnel.c
756
} else if (payload_protocol == htons(ETH_P_IPV6)) {
net/ipv4/ip_tunnel.c
802
if (payload_protocol == htons(ETH_P_IP) && !tunnel->ignore_df)
net/ipv4/ip_tunnel.c
803
df |= (inner_iph->frag_off & htons(IP_DF));
net/ipv4/ip_tunnel.c
823
if (payload_protocol == htons(ETH_P_IP))
net/ipv4/ip_tunnel.c
826
else if (payload_protocol == htons(ETH_P_IPV6))
net/ipv4/ip_tunnel.c
918
p->iph.frag_off |= htons(IP_DF);
net/ipv4/ip_tunnel_core.c
1110
return htons(ETH_P_IP);
net/ipv4/ip_tunnel_core.c
1114
return htons(ETH_P_IPV6);
net/ipv4/ip_tunnel_core.c
117
if (!raw_proto && inner_proto == htons(ETH_P_TEB)) {
net/ipv4/ip_tunnel_core.c
1172
parms->iph.frag_off = htons(IP_DF);
net/ipv4/ip_tunnel_core.c
1179
parms->iph.frag_off = htons(IP_DF);
net/ipv4/ip_tunnel_core.c
127
skb->protocol = htons(ETH_P_802_2);
net/ipv4/ip_tunnel_core.c
246
.un.frag.mtu = htons(mtu),
net/ipv4/ip_tunnel_core.c
256
.tot_len = htons(len + sizeof(*niph)),
net/ipv4/ip_tunnel_core.c
258
.frag_off = htons(IP_DF),
net/ipv4/ip_tunnel_core.c
287
if (mtu < 576 || iph->frag_off != htons(IP_DF))
net/ipv4/ip_tunnel_core.c
351
.payload_len = htons(len),
net/ipv4/ip_tunnel_core.c
395
if (offset < 0 || (frag_off & htons(~0x7)))
net/ipv4/ip_tunnel_core.c
445
if (skb->protocol == htons(ETH_P_IP))
net/ipv4/ip_tunnel_core.c
449
if (skb->protocol == htons(ETH_P_IPV6))
net/ipv4/ip_vti.c
182
case htons(ETH_P_IP): {
net/ipv4/ip_vti.c
197
case htons(ETH_P_IPV6):
net/ipv4/ip_vti.c
243
if (skb->protocol == htons(ETH_P_IP)) {
net/ipv4/ip_vti.c
244
if (!(ip_hdr(skb)->frag_off & htons(IP_DF)))
net/ipv4/ip_vti.c
292
case htons(ETH_P_IP):
net/ipv4/ip_vti.c
296
case htons(ETH_P_IPV6):
net/ipv4/ipconfig.c
1025
if (b->udph.source != htons(67) || b->udph.dest != htons(68))
net/ipv4/ipconfig.c
527
if (rarp->ar_op != htons(ARPOP_RREPLY))
net/ipv4/ipconfig.c
531
if (rarp->ar_pro != htons(ETH_P_IP))
net/ipv4/ipconfig.c
840
h->tot_len = htons(sizeof(struct bootp_pkt));
net/ipv4/ipconfig.c
841
h->frag_off = htons(IP_DF);
net/ipv4/ipconfig.c
848
b->udph.source = htons(68);
net/ipv4/ipconfig.c
849
b->udph.dest = htons(67);
net/ipv4/ipconfig.c
850
b->udph.len = htons(sizeof(struct bootp_pkt) - sizeof(struct iphdr));
net/ipv4/ipconfig.c
868
b->secs = htons(jiffies_diff / HZ);
net/ipv4/ipconfig.c
881
skb->protocol = htons(ETH_P_IP);
net/ipv4/ipip.c
205
.proto = htons(ETH_P_IP),
net/ipv4/ipip.c
211
.proto = htons(ETH_P_MPLS_UC),
net/ipv4/ipip.c
293
case htons(ETH_P_IP):
net/ipv4/ipip.c
297
case htons(ETH_P_MPLS_UC):
net/ipv4/ipip.c
346
p->iph.ihl != 5 || (p->iph.frag_off & htons(~IP_DF)))
net/ipv4/ipip.c
559
!!(parm->iph.frag_off & htons(IP_DF))) ||
net/ipv4/ipmr.c
1082
ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(pkt)->tot_len) +
net/ipv4/ipmr.c
1101
ip_hdr(skb)->tot_len = htons(skb->len); /* Fix the length */
net/ipv4/ipmr.c
1812
iph->tot_len = htons(skb->len);
net/ipv4/ipmr.c
625
skb->protocol = htons(ETH_P_IP);
net/ipv4/netfilter/ipt_ECN.c
38
csum_replace2(&iph->check, htons(oldtos), htons(iph->tos));
net/ipv4/netfilter/nf_dup_ipv4.c
46
skb->protocol = htons(ETH_P_IP);
net/ipv4/netfilter/nf_dup_ipv4.c
83
iph->frag_off |= htons(IP_DF);
net/ipv4/netfilter/nf_nat_h323.c
204
htons(ntohs(info->rtp_port[i][dir]) + 1);
net/ipv4/netfilter/nf_nat_h323.c
223
rtp_exp->tuple.dst.u.udp.port = htons(nated_port);
net/ipv4/netfilter/nf_nat_h323.c
227
htons(nated_port + 1);
net/ipv4/netfilter/nf_nat_h323.c
253
htons((port & htons(1)) ? nated_port + 1 :
net/ipv4/netfilter/nf_nat_h323.c
262
info->rtp_port[i][!dir] = htons(nated_port);
net/ipv4/netfilter/nf_nat_h323.c
303
htons(nated_port)) < 0) {
net/ipv4/netfilter/nf_nat_h323.c
346
htons(nated_port))) {
net/ipv4/netfilter/nf_nat_h323.c
353
info->sig_port[!dir] = htons(nated_port);
net/ipv4/netfilter/nf_nat_h323.c
425
htons(nated_port))) {
net/ipv4/netfilter/nf_nat_h323.c
432
info->sig_port[!dir] = htons(nated_port);
net/ipv4/netfilter/nf_nat_h323.c
505
htons(nated_port))) {
net/ipv4/netfilter/nf_nat_snmp_basic_main.c
170
if (udph->source == htons(SNMP_PORT) && dir != IP_CT_DIR_REPLY)
net/ipv4/netfilter/nf_nat_snmp_basic_main.c
172
if (udph->dest == htons(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL)
net/ipv4/netfilter/nf_reject_ipv4.c
121
if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET))
net/ipv4/netfilter/nf_reject_ipv4.c
166
niph->tot_len = htons(nskb->len);
net/ipv4/netfilter/nf_reject_ipv4.c
180
if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET))
net/ipv4/netfilter/nf_reject_ipv4.c
214
niph->frag_off = htons(IP_DF);
net/ipv4/netfilter/nf_reject_ipv4.c
221
nskb->protocol = htons(ETH_P_IP);
net/ipv4/netfilter/nf_reject_ipv4.c
329
niph->tot_len = htons(nskb->len);
net/ipv4/netfilter/nf_reject_ipv4.c
352
if (iph->frag_off & htons(IP_OFFSET))
net/ipv4/netfilter/nf_reject_ipv4.c
76
niph->tot_len = htons(nskb->len);
net/ipv4/ping.c
167
if (skb->protocol == htons(ETH_P_IP)) {
net/ipv4/ping.c
173
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv4/ping.c
195
if (skb->protocol == htons(ETH_P_IP) &&
net/ipv4/ping.c
206
} else if (skb->protocol == htons(ETH_P_IPV6) &&
net/ipv4/ping.c
456
isk->inet_sport = htons(isk->inet_num);
net/ipv4/ping.c
502
if (skb->protocol == htons(ETH_P_IP)) {
net/ipv4/ping.c
507
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv4/ping.c
536
if (skb->protocol == htons(ETH_P_IP)) {
net/ipv4/ping.c
575
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv4/ping.c
921
if (skb->protocol == htons(ETH_P_IPV6) &&
net/ipv4/ping.c
924
else if (skb->protocol == htons(ETH_P_IP) &&
net/ipv4/raw.c
360
skb->protocol = htons(ETH_P_IP);
net/ipv4/raw.c
400
iph->tot_len = htons(length);
net/ipv4/route.c
1721
if (skb->protocol != htons(ETH_P_IP))
net/ipv4/route.c
1845
skb->protocol == htons(ETH_P_IP)) {
net/ipv4/route.c
1854
if (skb->protocol != htons(ETH_P_IP)) {
net/ipv4/route.c
1923
if (unlikely((outer_iph->frag_off & htons(IP_OFFSET)) != 0))
net/ipv4/route.c
2398
if (skb->protocol != htons(ETH_P_IP)) {
net/ipv4/route.c
3176
skb->protocol = htons(ETH_P_IP);
net/ipv4/route.c
3193
udph->len = htons(sizeof(struct udphdr));
net/ipv4/route.c
506
iph->id = htons(id);
net/ipv4/tcp.c
4435
if (skb->protocol == htons(ETH_P_IP))
net/ipv4/tcp.c
4437
else if (skb->protocol == htons(ETH_P_IPV6))
net/ipv4/tcp_ao.c
366
tmp->outlen = htons(tcp_ao_digest_size(mkt) * 8); /* in bits */
net/ipv4/tcp_ao.c
380
sk->sk_daddr, htons(sk->sk_num),
net/ipv4/tcp_ao.c
385
htons(sk->sk_num), disn, sisn);
net/ipv4/tcp_ao.c
409
htons(ireq->ir_num), ireq->ir_rmt_port,
net/ipv4/tcp_diag.c
512
if (r->id.idiag_sport != htons(READ_ONCE(sk->sk_num)) &&
net/ipv4/tcp_input.c
1001
if (skb->protocol == htons(ETH_P_IPV6))
net/ipv4/tcp_input.c
5073
skb->protocol == htons(ETH_P_IPV6) &&
net/ipv4/tcp_ipv4.c
969
rep.th.window = htons(win);
net/ipv4/tcp_output.c
1611
*(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) |
net/ipv4/tcp_output.c
1620
th->urg_ptr = htons(tp->snd_up - tcb->seq);
net/ipv4/tcp_output.c
1623
th->urg_ptr = htons(0xFFFF);
net/ipv4/tcp_output.c
1630
th->window = htons(tcp_select_window(sk));
net/ipv4/tcp_output.c
1636
th->window = htons(min(tp->rcv_wnd, 65535U));
net/ipv4/tcp_output.c
4043
th->source = htons(ireq->ir_num);
net/ipv4/tcp_output.c
4052
th->window = htons(min(req->rsk_rcv_wnd, 65535U));
net/ipv4/udp.c
1136
uh->len = htons(len);
net/ipv4/udp.c
1802
if (skb->protocol == htons(ETH_P_IP))
net/ipv4/udp_offload.c
282
uh->len = htons(skb_shinfo(skb)->gso_size +
net/ipv4/udp_offload.c
286
uh->len = htons(len);
net/ipv4/udp_offload.c
472
udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss);
net/ipv4/udp_offload.c
559
msslen = htons(sizeof(*uh) + mss);
net/ipv4/udp_offload.c
577
newlen = htons(sizeof(*uh) + mss);
net/ipv4/udp_offload.c
604
newlen = htons(skb_tail_pointer(seg) - skb_transport_header(seg) +
net/ipv4/udp_offload.c
866
if (sk && dport == htons(sk->sk_num))
net/ipv4/udp_offload.c
928
__be16 newlen = htons(skb->len - nhoff);
net/ipv4/udp_offload.c
971
uh->len = htons(skb->len - nhoff);
net/ipv4/udp_tunnel_core.c
187
uh->len = htons(skb->len);
net/ipv4/udp_tunnel_nic.c
504
ti->port == htons(IANA_VXLAN_UDP_PORT)) {
net/ipv4/xfrm4_input.c
133
iph->tot_len = htons(ntohs(iph->tot_len) - len);
net/ipv4/xfrm4_input.c
62
iph->tot_len = htons(skb->len);
net/ipv6/af_inet6.c
245
inet->inet_sport = htons(inet->inet_num);
net/ipv6/af_inet6.c
421
inet->inet_sport = htons(inet->inet_num);
net/ipv6/ah6.c
393
top_iph->payload_len = htons(skb->len - sizeof(*top_iph));
net/ipv6/calipso.c
1361
ip6_hdr->payload_len = htons(payload + len_delta);
net/ipv6/datagram.c
320
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/datagram.c
359
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/datagram.c
492
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/datagram.c
517
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/datagram.c
600
bool is_ipv6 = skb->protocol == htons(ETH_P_IPV6);
net/ipv6/esp6.c
358
uh->len = htons(len);
net/ipv6/esp6.c
389
*lenp = htons(len);
net/ipv6/esp6_offload.c
163
__be16 type = inner_mode->family == AF_INET ? htons(ETH_P_IP)
net/ipv6/esp6_offload.c
164
: htons(ETH_P_IPV6);
net/ipv6/esp6_offload.c
373
ipv6_hdr(skb)->payload_len = htons(len);
net/ipv6/exthdrs.c
417
skb->protocol = htons(ETH_P_IP);
net/ipv6/exthdrs.c
614
ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/fou6.c
33
uh->len = htons(skb->len);
net/ipv6/icmp.c
535
addr6_subobj->afi = htons(ICMP_AFI_IP6);
net/ipv6/icmp.c
551
objh->length = htons(skb_tail_pointer(skb) - (unsigned char *)objh);
net/ipv6/ila/ila_lwt.c
113
if (skb->protocol != htons(ETH_P_IPV6))
net/ipv6/ila/ila_lwt.c
46
if (skb->protocol != htons(ETH_P_IPV6))
net/ipv6/inet6_connection_sock.c
47
fl6->fl6_sport = htons(ireq->ir_num);
net/ipv6/inet6_hashtables.c
320
inet->inet_sport = htons(lport);
net/ipv6/ioam6_iptunnel.c
346
if (skb->protocol != htons(ETH_P_IPV6))
net/ipv6/ip6_gre.c
1004
proto = htons(ETH_P_ERSPAN);
net/ipv6/ip6_gre.c
1011
proto = htons(ETH_P_ERSPAN2);
net/ipv6/ip6_gre.c
1017
case htons(ETH_P_IP):
net/ipv6/ip6_gre.c
1022
case htons(ETH_P_IPV6):
net/ipv6/ip6_gre.c
1038
proto = htons(ETH_P_ERSPAN);
net/ipv6/ip6_gre.c
1044
proto = htons(ETH_P_ERSPAN2);
net/ipv6/ip6_gre.c
1068
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/ip6_gre.c
1391
p[1] = htons(type);
net/ipv6/ip6_gre.c
150
int dev_type = (gre_proto == htons(ETH_P_TEB) ||
net/ipv6/ip6_gre.c
151
gre_proto == htons(ETH_P_ERSPAN) ||
net/ipv6/ip6_gre.c
152
gre_proto == htons(ETH_P_ERSPAN2)) ?
net/ipv6/ip6_gre.c
202
if (gre_proto == htons(ETH_P_ERSPAN) ||
net/ipv6/ip6_gre.c
203
gre_proto == htons(ETH_P_ERSPAN2))
net/ipv6/ip6_gre.c
395
if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IPV6),
net/ipv6/ip6_gre.c
517
htons(ETH_P_TEB),
net/ipv6/ip6_gre.c
576
hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IPV6), 0);
net/ipv6/ip6_gre.c
583
if (unlikely(tpi.proto == htons(ETH_P_ERSPAN) ||
net/ipv6/ip6_gre.c
584
tpi.proto == htons(ETH_P_ERSPAN2))) {
net/ipv6/ip6_gre.c
735
protocol = (dev->type == ARPHRD_ETHER) ? htons(ETH_P_TEB) : proto;
net/ipv6/ip6_gre.c
892
case htons(ETH_P_IP):
net/ipv6/ip6_gre.c
895
case htons(ETH_P_IPV6):
net/ipv6/ip6_gre.c
948
if (skb->protocol == htons(ETH_P_IP) &&
net/ipv6/ip6_gre.c
952
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/ip6_input.c
557
if (opt->ra == htons(IPV6_OPT_ROUTERALERT_MLD)) {
net/ipv6/ip6_offload.c
153
ipv6h->payload_len = htons(payload_len);
net/ipv6/ip6_offload.c
164
fptr->frag_off = htons(offset);
net/ipv6/ip6_offload.c
166
fptr->frag_off |= htons(IP6_MF);
net/ipv6/ip6_output.c
1679
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/ip6_output.c
233
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/ip6_output.c
331
hdr->payload_len = htons(seg_len);
net/ipv6/ip6_output.c
338
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/ip6_output.c
727
fh->frag_off = htons(IP6_MF);
net/ipv6/ip6_output.c
733
ipv6_hdr(skb)->payload_len = htons(first_len - sizeof(struct ipv6hdr));
net/ipv6/ip6_output.c
755
fh->frag_off = htons(iter->offset);
net/ipv6/ip6_output.c
757
fh->frag_off |= htons(IP6_MF);
net/ipv6/ip6_output.c
759
ipv6_hdr(frag)->payload_len = htons(frag->len - sizeof(struct ipv6hdr));
net/ipv6/ip6_output.c
849
fh->frag_off = htons(state->offset);
net/ipv6/ip6_output.c
851
fh->frag_off |= htons(IP6_MF);
net/ipv6/ip6_output.c
852
ipv6_hdr(frag)->payload_len = htons(frag->len - sizeof(struct ipv6hdr));
net/ipv6/ip6_tunnel.c
1120
if (payload_protocol == htons(ETH_P_IPV6)) {
net/ipv6/ip6_tunnel.c
1141
} else if (payload_protocol == htons(ETH_P_IP)) {
net/ipv6/ip6_tunnel.c
1200
mtu = max(mtu, skb->protocol == htons(ETH_P_IPV6) ?
net/ipv6/ip6_tunnel.c
1252
if (payload_protocol == htons(ETH_P_IP))
net/ipv6/ip6_tunnel.c
1254
else if (payload_protocol == htons(ETH_P_IPV6))
net/ipv6/ip6_tunnel.c
1438
case htons(ETH_P_IP):
net/ipv6/ip6_tunnel.c
1441
case htons(ETH_P_IPV6):
net/ipv6/ip6_tunnel.c
1446
case htons(ETH_P_MPLS_UC):
net/ipv6/ip6_tunnel.c
905
if (tpi->proto == htons(ETH_P_IP))
net/ipv6/ip6_tunnel.c
915
.proto = htons(ETH_P_IPV6),
net/ipv6/ip6_tunnel.c
920
.proto = htons(ETH_P_IP),
net/ipv6/ip6_tunnel.c
925
.proto = htons(ETH_P_MPLS_UC),
net/ipv6/ip6_udp_tunnel.c
106
ip6h->payload_len = htons(skb->len);
net/ipv6/ip6_udp_tunnel.c
96
uh->len = htons(skb->len);
net/ipv6/ip6_vti.c
453
case htons(ETH_P_IP): {
net/ipv6/ip6_vti.c
465
case htons(ETH_P_IPV6):
net/ipv6/ip6_vti.c
513
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/ip6_vti.c
519
if (!(ip_hdr(skb)->frag_off & htons(IP_DF)))
net/ipv6/ip6_vti.c
561
case htons(ETH_P_IPV6):
net/ipv6/ip6_vti.c
569
case htons(ETH_P_IP):
net/ipv6/ip6mr.c
593
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/mcast.c
1453
IP6CB(skb)->ra != htons(IPV6_OPT_ROUTERALERT_MLD))
net/ipv6/mcast.c
1739
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/mcast.c
1748
hdr->payload_len = htons(len);
net/ipv6/mcast.c
1834
pip6->payload_len = htons(payload_len);
net/ipv6/mcast.c
1896
pmr->mld2r_ngrec = htons(ntohs(pmr->mld2r_ngrec)+1);
net/ipv6/mcast.c
1980
pgr->grec_nsrcs = htons(scount);
net/ipv6/mcast.c
2029
pgr->grec_nsrcs = htons(scount);
net/ipv6/mip6.c
237
sel.dport_mask = htons(~0);
net/ipv6/mip6.c
240
sel.sport_mask = htons(~0);
net/ipv6/ndisc.c
424
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/ndisc.c
460
hdr->payload_len = htons(len);
net/ipv6/netfilter/ip6t_eui64.c
33
if (eth_hdr(skb)->h_proto == htons(ETH_P_IPV6)) {
net/ipv6/netfilter/ip6t_frag.c
59
pr_debug("MF %04X ", fh->frag_off & htons(IP6_MF));
net/ipv6/netfilter/nf_conntrack_reasm.c
206
if (!(fhdr->frag_off & htons(IP6_MF))) {
net/ipv6/netfilter/nf_conntrack_reasm.c
360
ipv6_hdr(skb)->payload_len = htons(payload_len);
net/ipv6/netfilter/nf_dup_ipv6.c
42
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/netfilter/nf_reject_ipv6.c
101
nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr));
net/ipv6/netfilter/nf_reject_ipv6.c
178
nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr));
net/ipv6/netfilter/nf_reject_ipv6.c
259
nskb->protocol = htons(ETH_P_IPV6);
net/ipv6/netfilter/nf_reject_ipv6.c
398
nskb->protocol = htons(ETH_P_IPV6);
net/ipv6/netfilter/nf_reject_ipv6.c
399
ip6h->payload_len = htons(sizeof(struct tcphdr));
net/ipv6/netfilter/nf_reject_ipv6.c
425
if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0)
net/ipv6/netfilter/nf_reject_ipv6.c
44
if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0)
net/ipv6/output_core.c
138
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/raw.c
622
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/reassembly.c
148
if (!(fhdr->frag_off & htons(IP6_MF))) {
net/ipv6/reassembly.c
298
ipv6_hdr(skb)->payload_len = htons(payload_len);
net/ipv6/reassembly.c
350
if (!(fhdr->frag_off & htons(IP6_OFFSET | IP6_MF))) {
net/ipv6/rpl_iptunnel.c
180
ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/rpl_iptunnel.c
196
if (skb->protocol != htons(ETH_P_IPV6))
net/ipv6/seg6_iptunnel.c
121
} else if (!do_flowlabel && skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/seg6_iptunnel.c
158
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/seg6_iptunnel.c
195
hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/seg6_iptunnel.c
255
if (skb->protocol == htons(ETH_P_IPV6)) {
net/ipv6/seg6_iptunnel.c
322
hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/seg6_iptunnel.c
375
hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/seg6_iptunnel.c
392
if (skb->protocol != htons(ETH_P_IPV6))
net/ipv6/seg6_iptunnel.c
405
if (skb->protocol == htons(ETH_P_IPV6))
net/ipv6/seg6_iptunnel.c
407
else if (skb->protocol == htons(ETH_P_IP))
net/ipv6/seg6_iptunnel.c
424
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/seg6_iptunnel.c
449
skb->protocol = htons(ETH_P_IPV6);
net/ipv6/seg6_iptunnel.c
537
case htons(ETH_P_IP):
net/ipv6/seg6_iptunnel.c
540
case htons(ETH_P_IPV6):
net/ipv6/seg6_iptunnel.c
622
case htons(ETH_P_IP):
net/ipv6/seg6_iptunnel.c
625
case htons(ETH_P_IPV6):
net/ipv6/seg6_local.c
1145
protocol = htons(ETH_P_IP);
net/ipv6/seg6_local.c
1149
protocol = htons(ETH_P_IPV6);
net/ipv6/seg6_local.c
1633
if (skb->protocol != htons(ETH_P_IPV6)) {
net/ipv6/seg6_local.c
732
iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/seg6_local.c
991
skb->protocol = htons(ETH_P_IP);
net/ipv6/sit.c
1067
case htons(ETH_P_IP):
net/ipv6/sit.c
1070
case htons(ETH_P_IPV6):
net/ipv6/sit.c
1074
case htons(ETH_P_MPLS_UC):
net/ipv6/sit.c
1258
p->iph.ihl != 5 || (p->iph.frag_off & htons(~IP_DF)))
net/ipv6/sit.c
1262
p->iph.frag_off |= htons(IP_DF);
net/ipv6/sit.c
1698
!!(parm->iph.frag_off & htons(IP_DF))) ||
net/ipv6/sit.c
704
if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6),
net/ipv6/sit.c
742
.proto = htons(ETH_P_IP),
net/ipv6/sit.c
748
.proto = htons(ETH_P_MPLS_UC),
net/ipv6/sit.c
834
if (v6dst->s6_addr16[0] == htons(0x2002)) {
net/ipv6/tcp_ao.c
44
tmp->outlen = htons(tcp_ao_digest_size(mkt) * 8); /* in bits */
net/ipv6/tcp_ao.c
70
&sk->sk_v6_daddr, htons(sk->sk_num),
net/ipv6/tcp_ao.c
75
htons(sk->sk_num), disn, sisn);
net/ipv6/tcp_ao.c
85
htons(ireq->ir_num), ireq->ir_rmt_port,
net/ipv6/tcp_ipv6.c
1284
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/tcp_ipv6.c
1370
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/tcp_ipv6.c
1548
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/tcp_ipv6.c
872
t1->window = htons(win);
net/ipv6/udp.c
1388
uh->len = htons(len);
net/ipv6/udp.c
499
is_udp4 = (skb->protocol == htons(ETH_P_IP));
net/ipv6/udp_offload.c
125
if (sk && dport == htons(sk->sk_num))
net/ipv6/udp_offload.c
175
uh->len = htons(skb->len - nhoff);
net/ipv6/xfrm6_input.c
128
ip6h->payload_len = htons(ntohs(ip6h->payload_len) - len);
net/ipv6/xfrm6_input.c
160
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/xfrm6_input.c
186
if (skb->protocol == htons(ETH_P_IP))
net/ipv6/xfrm6_input.c
57
ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
net/ipv6/xfrm6_output.c
78
if (skb->protocol == htons(ETH_P_IPV6))
net/key/af_key.c
2283
xp->selector.sport_mask = htons(0xffff);
net/key/af_key.c
2296
xp->selector.dport_mask = htons(0xffff);
net/key/af_key.c
2390
sel.sport_mask = htons(0xffff);
net/key/af_key.c
2398
sel.dport_mask = htons(0xffff);
net/key/af_key.c
2598
sel.sport_mask = htons(0xffff);
net/key/af_key.c
2607
sel.dport_mask = htons(0xffff);
net/l2tp/l2tp_core.c
1153
*bufp++ = htons(flags);
net/l2tp/l2tp_core.c
1154
*bufp++ = htons(tunnel_id);
net/l2tp/l2tp_core.c
1155
*bufp++ = htons(session_id);
net/l2tp/l2tp_core.c
1157
*bufp++ = htons(session->ns);
net/l2tp/l2tp_core.c
1178
*((__be16 *)bufp) = htons(flags);
net/l2tp/l2tp_core.c
1293
uh->len = htons(udp_len);
net/l2tp/l2tp_core.c
1485
udp_conf.local_udp_port = htons(cfg->local_udp_port);
net/l2tp/l2tp_core.c
1486
udp_conf.peer_udp_port = htons(cfg->peer_udp_port);
net/llc/af_llc.c
76
return htons(ETH_P_802_2);
net/llc/llc_input.c
129
if (skb->protocol == htons(ETH_P_802_2)) {
net/llc/llc_sap.c
62
skb->protocol = htons(ETH_P_802_2);
net/mac80211/rx.c
2861
xmit_skb->protocol = htons(ETH_P_802_3);
net/mac80211/rx.c
2919
skb->protocol = htons(skb->len - hdrlen);
net/mac80211/rx.c
3075
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
net/mac80211/rx.c
4910
xmit_skb->protocol = htons(ETH_P_802_3);
net/mac80211/rx.c
790
skb->protocol = htons(ETH_P_802_2);
net/mac80211/status.c
937
skb->protocol = htons(ETH_P_802_2);
net/mac80211/tx.c
4402
if (ethertype == htons(ETH_P_8021Q) && skb->len >= VLAN_ETH_HLEN)
net/mac80211/tx.c
4405
case htons(ETH_P_ARP):
net/mac80211/tx.c
4406
case htons(ETH_P_IP):
net/mac80211/tx.c
4407
case htons(ETH_P_IPV6):
net/mac80211/tx.c
6455
skb->protocol = htons(ETH_P_802_3);
net/mac802154/rx.c
27
skb->protocol = htons(ETH_P_IEEE802154);
net/mac802154/rx.c
380
skb->protocol = htons(ETH_P_IEEE802154);
net/mctp/route.c
1160
skb->protocol = htons(ETH_P_MCTP);
net/mctp/route.c
627
skb->protocol = htons(ETH_P_MCTP);
net/mpls/af_mpls.c
161
if (skb->protocol == htons(ETH_P_MPLS_UC)) {
net/mpls/af_mpls.c
167
} else if (skb->protocol == htons(ETH_P_IP)) {
net/mpls/af_mpls.c
170
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/mpls/af_mpls.c
2496
skb->protocol = htons(ETH_P_MPLS_UC);
net/mpls/af_mpls.c
321
skb->protocol = htons(ETH_P_IP);
net/mpls/af_mpls.c
335
htons(hdr4->ttl << 8),
net/mpls/af_mpls.c
336
htons(new_ttl << 8));
net/mpls/af_mpls.c
343
skb->protocol = htons(ETH_P_IPV6);
net/mpls/af_mpls.c
456
skb->protocol = htons(ETH_P_MPLS_UC);
net/mpls/mpls_iptunnel.c
120
skb->protocol = htons(ETH_P_MPLS_UC);
net/mptcp/options.c
1357
th->window = htons(new_win);
net/mptcp/options.c
1392
header.data_len = htons(data_len);
net/mptcp/options.c
271
mp_opt->addr.port = htons(get_unaligned_be16(ptr));
net/mptcp/options.c
281
mp_opt->addr.port = htons(get_unaligned_be16(ptr));
net/mptcp/pm.c
86
addr->port = htons(skc->skc_num);
net/mptcp/pm_netlink.c
126
entry->addr.port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]));
net/mptcp/pm_netlink.c
87
addr->port = htons(nla_get_u16(tb[MPTCP_PM_ADDR_ATTR_PORT]));
net/mptcp/subflow.c
711
if (skb->protocol == htons(ETH_P_IP))
net/ncsi/ncsi-cmd.c
141
cmd->vlan = htons(nca->words[1]);
net/ncsi/ncsi-cmd.c
315
skb->protocol = htons(ETH_P_NCSI);
net/ncsi/ncsi-cmd.c
380
eh->h_proto = htons(ETH_P_NCSI);
net/ncsi/ncsi-cmd.c
51
h->length = htons(nca->payload);
net/netfilter/ipset/ip_set_bitmap_port.c
89
htons(map->first_port + id));
net/netfilter/ipset/ip_set_bitmap_port.c
95
return nla_put_net16(skb, IPSET_ATTR_PORT, htons(map->first_port)) ||
net/netfilter/ipset/ip_set_bitmap_port.c
96
nla_put_net16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port));
net/netfilter/ipset/ip_set_core.c
1649
nla_put_net16(skb, IPSET_ATTR_INDEX, htons(index)))
net/netfilter/ipset/ip_set_core.c
2074
nla_put_net16(skb2, IPSET_ATTR_INDEX, htons(id)))
net/netfilter/ipset/ip_set_getport.c
144
if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
net/netfilter/ipset/ip_set_getport.c
74
*port = (__force __be16)htons((ic->type << 8) | ic->code);
net/netfilter/ipset/ip_set_getport.c
86
htons((ic->icmp6_type << 8) | ic->icmp6_code);
net/netfilter/ipset/ip_set_hash_ipport.c
194
e.port = htons(p);
net/netfilter/ipset/ip_set_hash_ipport.c
350
e.port = htons(port);
net/netfilter/ipset/ip_set_hash_ipportip.c
190
e.port = htons(p);
net/netfilter/ipset/ip_set_hash_ipportip.c
345
e.port = htons(port);
net/netfilter/ipset/ip_set_hash_ipportnet.c
280
e.port = htons(p);
net/netfilter/ipset/ip_set_hash_ipportnet.c
503
e.port = htons(port);
net/netfilter/ipset/ip_set_hash_netport.c
250
e.port = htons(p);
net/netfilter/ipset/ip_set_hash_netport.c
449
e.port = htons(port);
net/netfilter/ipset/ip_set_hash_netportnet.c
312
e.port = htons(p);
net/netfilter/ipset/ip_set_hash_netportnet.c
559
e.port = htons(port);
net/netfilter/ipvs/ip_vs_app.c
91
inc->port = htons(port);
net/netfilter/ipvs/ip_vs_conn.c
792
if (ct->vport != htons(0xffff)) {
net/netfilter/ipvs/ip_vs_conn.c
794
ct->dport = htons(0xffff);
net/netfilter/ipvs/ip_vs_conn.c
795
ct->vport = htons(0xffff);
net/netfilter/ipvs/ip_vs_core.c
1557
if (type != htons(ETH_P_IP))
net/netfilter/ipvs/ip_vs_core.c
1636
if (unlikely(cih->frag_off & htons(IP_OFFSET)))
net/netfilter/ipvs/ip_vs_core.c
1658
if (unlikely(cih->frag_off & htons(IP_OFFSET)))
net/netfilter/ipvs/ip_vs_core.c
1690
if (unlikely(cih->frag_off & htons(IP_OFFSET) &&
net/netfilter/ipvs/ip_vs_core.c
1750
if (!(frag_off & htons(IP_DF)))
net/netfilter/ipvs/ip_vs_core.c
968
if (unlikely(cih->frag_off & htons(IP_OFFSET) &&
net/netfilter/ipvs/ip_vs_ftp.c
230
*port = htons(hport);
net/netfilter/ipvs/ip_vs_ftp.c
533
htons(ntohs(cp->vport)-1), &p);
net/netfilter/ipvs/ip_vs_ftp.c
537
htons(ntohs(cp->dport)-1),
net/netfilter/ipvs/ip_vs_proto.c
225
else if (ih->frag_off & htons(IP_OFFSET))
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
45
&iph->saddr, htons(PORT_ISAKMP),
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
46
&iph->daddr, htons(PORT_ISAKMP), p);
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
49
&iph->daddr, htons(PORT_ISAKMP),
net/netfilter/ipvs/ip_vs_proto_ah_esp.c
50
&iph->saddr, htons(PORT_ISAKMP), p);
net/netfilter/ipvs/ip_vs_proto_tcp.c
188
htons(oldlen),
net/netfilter/ipvs/ip_vs_proto_tcp.c
189
htons(skb->len - tcphoff));
net/netfilter/ipvs/ip_vs_proto_tcp.c
271
htons(oldlen),
net/netfilter/ipvs/ip_vs_proto_tcp.c
272
htons(skb->len - tcphoff));
net/netfilter/ipvs/ip_vs_proto_udp.c
181
htons(oldlen),
net/netfilter/ipvs/ip_vs_proto_udp.c
182
htons(skb->len - udphoff));
net/netfilter/ipvs/ip_vs_proto_udp.c
265
htons(oldlen),
net/netfilter/ipvs/ip_vs_proto_udp.c
266
htons(skb->len - udphoff));
net/netfilter/ipvs/ip_vs_sync.c
1446
.sin6_port = htons(c->mcast_port + id),
net/netfilter/ipvs/ip_vs_sync.c
1453
.sin_port = htons(c->mcast_port + id),
net/netfilter/ipvs/ip_vs_sync.c
345
sb->mesg->size = htons(sizeof(struct ip_vs_sync_mesg));
net/netfilter/ipvs/ip_vs_sync.c
433
mesg->size = htons(sizeof(struct ip_vs_sync_mesg_v0));
net/netfilter/ipvs/ip_vs_sync.c
600
s->flags = htons(cp->flags & ~IP_VS_CONN_F_HASHED);
net/netfilter/ipvs/ip_vs_sync.c
601
s->state = htons(cp->state);
net/netfilter/ipvs/ip_vs_sync.c
609
m->size = htons(ntohs(m->size) + len);
net/netfilter/ipvs/ip_vs_sync.c
713
m->size = htons(ntohs(m->size) + pad + len);
net/netfilter/ipvs/ip_vs_sync.c
722
s->v4.ver_size = htons(len & SVER_MASK); /* Version 0 */
net/netfilter/ipvs/ip_vs_sync.c
724
s->v4.state = htons(cp->state);
net/netfilter/ipvs/ip_vs_xmit.c
1068
pd[0] = htons(csum_start);
net/netfilter/ipvs/ip_vs_xmit.c
1069
pd[1] = htons(csum_start + skb->csum_offset);
net/netfilter/ipvs/ip_vs_xmit.c
1088
udph->len = htons(skb->len);
net/netfilter/ipvs/ip_vs_xmit.c
1101
htons(ETH_P_IP) : htons(ETH_P_IPV6);
net/netfilter/ipvs/ip_vs_xmit.c
1396
iph->payload_len = htons(payload_len);
net/netfilter/ipvs/ip_vs_xmit.c
234
if (unlikely(ip_hdr(skb)->frag_off & htons(IP_DF) &&
net/netfilter/ipvs/ip_vs_xmit.c
990
*df = (old_iph->frag_off & htons(IP_DF));
net/netfilter/nf_conntrack_amanda.c
141
port = htons(simple_strtoul(pbuf, &tmp, 10));
net/netfilter/nf_conntrack_broadcast.c
69
exp->mask.src.u.udp.port = htons(0xFFFF);
net/netfilter/nf_conntrack_core.c
2239
if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
net/netfilter/nf_conntrack_core.c
355
if (iph->frag_off & htons(IP_OFFSET))
net/netfilter/nf_conntrack_core.c
389
if (protoff < 0 || (frag_off & htons(~0x7)) != 0) {
net/netfilter/nf_conntrack_expect.c
371
exp->mask.src.u.all = htons(0xFFFF);
net/netfilter/nf_conntrack_ftp.c
163
cmd->u.tcp.port = htons((array[4] << 8) | array[5]);
net/netfilter/nf_conntrack_ftp.c
206
*port = htons(tmp_port);
net/netfilter/nf_conntrack_h323_main.c
228
rtp_port = port & ~htons(1);
net/netfilter/nf_conntrack_h323_main.c
229
rtcp_port = port | htons(1);
net/netfilter/nf_conntrack_helper.c
349
struct nf_conntrack_tuple_mask mask = { .src.u.all = htons(0xFFFF) };
net/netfilter/nf_conntrack_helper.c
442
helper->tuple.src.u.all = htons(spec_port);
net/netfilter/nf_conntrack_irc.c
237
port = htons(dcc_port);
net/netfilter/nf_conntrack_netlink.c
160
if (nla_put_be16(skb, attrtype, htons(zone->id)))
net/netfilter/nf_conntrack_netlink.c
2500
NFNETLINK_V0, htons(cpu));
net/netfilter/nf_conntrack_netlink.c
3698
NFNETLINK_V0, htons(cpu));
net/netfilter/nf_conntrack_ovs.c
47
if (ofs < 0 || (frag_off & htons(~0x7)) != 0) {
net/netfilter/nf_conntrack_proto.c
165
if (start < 0 || (frag_off & htons(~0x7)) != 0)
net/netfilter/nf_conntrack_sip.c
1109
&rtp_addr, htons(port), t->class,
net/netfilter/nf_conntrack_sip.c
275
*port = htons(p);
net/netfilter/nf_conntrack_sip.c
277
*port = htons(SIP_PORT);
net/netfilter/nf_conntrack_sip.c
528
*port = htons(p);
net/netfilter/nf_conntrack_sip.c
530
*port = htons(SIP_PORT);
net/netfilter/nf_conntrack_sip.c
945
rtp_port = htons(base_port);
net/netfilter/nf_conntrack_sip.c
946
rtcp_port = htons(base_port + 1);
net/netfilter/nf_flow_table_bpf.c
82
proto = htons(ETH_P_IP);
net/netfilter/nf_flow_table_bpf.c
87
proto = htons(ETH_P_IPV6);
net/netfilter/nf_flow_table_inet.c
19
case htons(ETH_P_8021Q):
net/netfilter/nf_flow_table_inet.c
26
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_inet.c
36
case htons(ETH_P_IP):
net/netfilter/nf_flow_table_inet.c
38
case htons(ETH_P_IPV6):
net/netfilter/nf_flow_table_ip.c
1066
if (!nf_flow_skb_encap_protocol(ctx, skb, htons(ETH_P_IPV6)))
net/netfilter/nf_flow_table_ip.c
178
case htons(ETH_P_8021Q):
net/netfilter/nf_flow_table_ip.c
185
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_ip.c
195
case htons(ETH_P_IP):
net/netfilter/nf_flow_table_ip.c
203
case htons(ETH_P_IPV6):
net/netfilter/nf_flow_table_ip.c
399
case htons(ETH_P_8021Q):
net/netfilter/nf_flow_table_ip.c
410
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_ip.c
420
case htons(ETH_P_IP):
net/netfilter/nf_flow_table_ip.c
423
case htons(ETH_P_IPV6):
net/netfilter/nf_flow_table_ip.c
446
case htons(ETH_P_8021Q):
net/netfilter/nf_flow_table_ip.c
452
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_ip.c
460
if (skb->protocol == htons(ETH_P_IP) ||
net/netfilter/nf_flow_table_ip.c
461
skb->protocol == htons(ETH_P_IPV6))
net/netfilter/nf_flow_table_ip.c
488
if (!nf_flow_skb_encap_protocol(ctx, skb, htons(ETH_P_IP)))
net/netfilter/nf_flow_table_ip.c
560
case htons(ETH_P_IP):
net/netfilter/nf_flow_table_ip.c
561
proto = htons(PPP_IP);
net/netfilter/nf_flow_table_ip.c
563
case htons(ETH_P_IPV6):
net/netfilter/nf_flow_table_ip.c
564
proto = htons(PPP_IPV6);
net/netfilter/nf_flow_table_ip.c
577
ph->hdr.sid = htons(id);
net/netfilter/nf_flow_table_ip.c
578
ph->hdr.length = htons(data_len);
net/netfilter/nf_flow_table_ip.c
580
skb->protocol = htons(ETH_P_PPP_SES);
net/netfilter/nf_flow_table_ip.c
622
iph->tot_len = htons(skb->len);
net/netfilter/nf_flow_table_ip.c
712
ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(*ip6h));
net/netfilter/nf_flow_table_ip.c
739
case htons(ETH_P_8021Q):
net/netfilter/nf_flow_table_ip.c
740
case htons(ETH_P_8021AD):
net/netfilter/nf_flow_table_ip.c
746
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_offload.c
123
tuple->encap[0].proto == htons(ETH_P_8021Q)) {
net/netfilter/nf_flow_table_offload.c
132
tuple->encap[1].proto == htons(ETH_P_8021Q)) {
net/netfilter/nf_flow_table_offload.c
151
key->basic.n_proto = htons(ETH_P_IP);
net/netfilter/nf_flow_table_offload.c
159
key->basic.n_proto = htons(ETH_P_IPV6);
net/netfilter/nf_flow_table_offload.c
706
if (tuple->encap[i].proto == htons(ETH_P_8021Q)) {
net/netfilter/nf_flow_table_offload.c
727
case htons(ETH_P_PPP_SES):
net/netfilter/nf_flow_table_offload.c
731
case htons(ETH_P_8021Q):
net/netfilter/nf_log_syslog.c
603
if (fh->frag_off & htons(0x0001))
net/netfilter/nf_log_syslog.c
938
case htons(ETH_P_IP):
net/netfilter/nf_log_syslog.c
94
if (ah->ar_hrd != htons(ARPHRD_ETHER) ||
net/netfilter/nf_log_syslog.c
941
case htons(ETH_P_IPV6):
net/netfilter/nf_log_syslog.c
944
case htons(ETH_P_ARP):
net/netfilter/nf_log_syslog.c
945
case htons(ETH_P_RARP):
net/netfilter/nf_nat_core.c
676
*keyptr = htons(min + off % range_size);
net/netfilter/nf_nat_helper.c
164
udph->len = htons(datalen);
net/netfilter/nf_nat_helper.c
218
exp->tuple.dst.u.tcp.port = htons(port);
net/netfilter/nf_nat_helper.c
59
ip_hdr(skb)->tot_len = htons(skb->len);
net/netfilter/nf_nat_helper.c
63
htons(skb->len - sizeof(struct ipv6hdr));
net/netfilter/nf_nat_ovs.c
30
if (proto == htons(ETH_P_IP) &&
net/netfilter/nf_nat_ovs.c
36
} else if (IS_ENABLED(CONFIG_IPV6) && proto == htons(ETH_P_IPV6)) {
net/netfilter/nf_nat_proto.c
360
if ((frag_off & htons(~0x7)) == 0 &&
net/netfilter/nf_nat_proto.c
472
htons(oldlen), htons(datalen), true);
net/netfilter/nf_nat_proto.c
492
htons(oldlen), htons(datalen), true);
net/netfilter/nf_nat_sip.c
247
htons(n) == ct->tuplehash[dir].tuple.dst.u.udp.port &&
net/netfilter/nf_nat_sip.c
248
htons(n) != ct->tuplehash[!dir].tuple.src.u.udp.port) {
net/netfilter/nf_nat_sip.c
597
rtp_exp->tuple.dst.u.udp.port = htons(port);
net/netfilter/nf_nat_sip.c
606
rtcp_exp->tuple.dst.u.udp.port = htons(port + 1);
net/netfilter/nf_synproxy_core.c
1018
nth->window = htons(ntohs(th->window) >> opts->wscale);
net/netfilter/nf_synproxy_core.c
408
iph->frag_off = htons(IP_DF);
net/netfilter/nf_synproxy_core.c
431
nskb->protocol = htons(ETH_P_IP);
net/netfilter/nf_synproxy_core.c
565
nth->window = htons(state->seen[IP_CT_DIR_ORIGINAL].td_maxwin);
net/netfilter/nf_synproxy_core.c
603
nth->window = htons(ntohs(th->window) >> opts->wscale);
net/netfilter/nf_synproxy_core.c
979
nth->window = htons(state->seen[IP_CT_DIR_ORIGINAL].td_maxwin);
net/netfilter/nf_tables_api.c
1161
return htons(nft_base_seq(net) & 0xffff);
net/netfilter/nf_tables_offload.c
63
(match->key.vlan.vlan_tpid == htons(ETH_P_8021Q) ||
net/netfilter/nf_tables_offload.c
64
match->key.vlan.vlan_tpid == htons(ETH_P_8021AD))) {
net/netfilter/nf_tables_offload.c
76
(match->key.basic.n_proto == htons(ETH_P_8021Q) ||
net/netfilter/nf_tables_offload.c
77
match->key.basic.n_proto == htons(ETH_P_8021AD))) {
net/netfilter/nf_tables_trace.c
61
veth.h_vlan_TCI = htons(skb_vlan_tag_get(skb));
net/netfilter/nf_tables_trace.c
77
htons(indev->type)))
net/netfilter/nf_tables_trace.c
87
htons(outdev->type)))
net/netfilter/nfnetlink_cthelper.c
474
htons(helper->tuple.src.l3num)))
net/netfilter/nfnetlink_cttimeout.c
200
htons(timeout->timeout.l3num)) ||
net/netfilter/nfnetlink_cttimeout.c
408
if (nla_put_be16(skb, CTA_TIMEOUT_L3PROTO, htons(l3num)) ||
net/netfilter/nfnetlink_log.c
433
if (nla_put_be16(inst->skb, NFULA_VLAN_TCI, htons(skb->vlan_tci)) ||
net/netfilter/nfnetlink_log.c
476
0, pf, NFNETLINK_V0, htons(inst->group_num));
net/netfilter/nfnetlink_log.c
578
phw.hw_addrlen = htons(len);
net/netfilter/nfnetlink_log.c
585
if (nla_put_be16(inst->skb, NFULA_HWTYPE, htons(skb->dev->type)) ||
net/netfilter/nfnetlink_log.c
587
htons(skb->dev->hard_header_len)))
net/netfilter/nfnetlink_queue.c
1096
skb->protocol = htons(ETH_P_IP);
net/netfilter/nfnetlink_queue.c
1099
skb->protocol = htons(ETH_P_IPV6);
net/netfilter/nfnetlink_queue.c
634
if (nla_put_be16(skb, NFQA_VLAN_TCI, htons(entskb->vlan_tci)) ||
net/netfilter/nfnetlink_queue.c
772
htons(queue->queue_num));
net/netfilter/nfnetlink_queue.c
871
phw.hw_addrlen = htons(len);
net/netfilter/nft_byteorder.c
82
d16[i] = (__force __u16)htons(s16[i]);
net/netfilter/nft_chain_filter.c
171
case htons(ETH_P_IP):
net/netfilter/nft_chain_filter.c
180
case htons(ETH_P_IPV6):
net/netfilter/nft_chain_filter.c
240
case htons(ETH_P_IP):
net/netfilter/nft_chain_filter.c
243
case htons(ETH_P_IPV6):
net/netfilter/nft_chain_filter.c
295
case htons(ETH_P_IP):
net/netfilter/nft_chain_filter.c
298
case htons(ETH_P_IPV6):
net/netfilter/nft_ct.c
1035
nla_put_be16(skb, NFTA_CT_TIMEOUT_L3PROTO, htons(timeout->l3num)))
net/netfilter/nft_ct.c
1230
if (nla_put_be16(skb, NFTA_CT_HELPER_L3PROTO, htons(family)))
net/netfilter/nft_ct.c
1327
if (nla_put_be16(skb, NFTA_CT_EXPECT_L3PROTO, htons(priv->l3num)) ||
net/netfilter/nft_exthdr.c
149
if (skb->protocol != htons(ETH_P_IP))
net/netfilter/nft_exthdr.c
350
inet_proto_csum_replace2(&tcph->check, pkt->skb, htons(o),
net/netfilter/nft_exthdr.c
351
htons(n), false);
net/netfilter/nft_exthdr.c
55
if (pkt->skb->protocol != htons(ETH_P_IPV6))
net/netfilter/nft_fwd_netdev.c
110
if (skb->protocol != htons(ETH_P_IP)) {
net/netfilter/nft_fwd_netdev.c
126
if (skb->protocol != htons(ETH_P_IPV6)) {
net/netfilter/nft_inner.c
106
llproto = htons(ETH_P_IP);
net/netfilter/nft_inner.c
109
llproto = htons(ETH_P_IPV6);
net/netfilter/nft_inner.c
117
if (llproto == htons(ETH_P_8021Q))
net/netfilter/nft_inner.c
123
case htons(ETH_P_IP): {
net/netfilter/nft_inner.c
144
case htons(ETH_P_IPV6): {
net/netfilter/nft_inner.c
75
case htons(ETH_P_IP):
net/netfilter/nft_inner.c
76
case htons(ETH_P_IPV6):
net/netfilter/nft_inner.c
80
case htons(ETH_P_8021Q):
net/netfilter/nft_log.c
209
if (nla_put_be16(skb, NFTA_LOG_GROUP, htons(li->u.ulog.group)))
net/netfilter/nft_log.c
219
htons(li->u.ulog.qthreshold)))
net/netfilter/nft_meta.c
113
case htons(ETH_P_IPV6):
net/netfilter/nft_meta.c
97
case htons(ETH_P_IP): {
net/netfilter/nft_payload.c
35
veth->h_vlan_TCI = htons(skb_vlan_tag_get(skb));
net/netfilter/nft_payload.c
462
case htons(ETH_P_IP):
net/netfilter/nft_payload.c
465
case htons(ETH_P_IPV6):
net/netfilter/nft_queue.c
159
if (nla_put_be16(skb, NFTA_QUEUE_NUM, htons(priv->queuenum)) ||
net/netfilter/nft_queue.c
160
nla_put_be16(skb, NFTA_QUEUE_TOTAL, htons(priv->queues_total)) ||
net/netfilter/nft_queue.c
161
nla_put_be16(skb, NFTA_QUEUE_FLAGS, htons(priv->flags)))
net/netfilter/nft_queue.c
177
nla_put_be16(skb, NFTA_QUEUE_FLAGS, htons(priv->flags)))
net/netfilter/nft_reject_netdev.c
118
case htons(ETH_P_IPV6):
net/netfilter/nft_reject_netdev.c
97
case htons(ETH_P_IP):
net/netfilter/nft_synproxy.c
141
case htons(ETH_P_IP):
net/netfilter/nft_synproxy.c
145
case htons(ETH_P_IPV6):
net/netfilter/nft_synproxy.c
231
if (nla_put_be16(skb, NFTA_SYNPROXY_MSS, htons(priv->info.mss)) ||
net/netfilter/xt_HL.c
57
csum_replace2(&iph->check, htons(iph->ttl << 8),
net/netfilter/xt_HL.c
58
htons(new_ttl << 8));
net/netfilter/xt_TCPMSS.c
134
htons(oldmss), htons(newmss),
net/netfilter/xt_TCPMSS.c
180
htons(len), htons(len + TCPOLEN_MSS), true);
net/netfilter/xt_TCPMSS.c
210
newlen = htons(ntohs(iph->tot_len) + ret);
net/netfilter/xt_TCPMSS.c
240
newlen = htons(ntohs(oldlen) + ret);
net/netfilter/xt_TCPOPTSTRIP.c
79
inet_proto_csum_replace2(&tcph->check, skb, htons(o),
net/netfilter/xt_TCPOPTSTRIP.c
80
htons(n), false);
net/netfilter/xt_sctp.c
68
++i, offset, sch->type, htons(sch->length),
net/netlink/af_netlink.c
303
nskb->protocol = htons((u16) sk->sk_protocol);
net/netrom/nr_dev.c
52
skb->protocol = htons(ETH_P_IP);
net/nsh/nsh.c
106
skb->mac_len = proto == htons(ETH_P_TEB) ? ETH_HLEN : 0;
net/nsh/nsh.c
112
skb_gso_error_unwind(skb, htons(ETH_P_NSH), nsh_len,
net/nsh/nsh.c
130
.type = htons(ETH_P_NSH),
net/nsh/nsh.c
39
skb->protocol = htons(ETH_P_NSH);
net/openvswitch/actions.c
1176
if (skb->protocol == htons(ETH_P_IPV6)) {
net/openvswitch/actions.c
1190
} else if (skb->protocol == htons(ETH_P_IP)) {
net/openvswitch/actions.c
1204
csum_replace2(&nh->check, htons(old_ttl << 8),
net/openvswitch/actions.c
1205
htons(nh->ttl << 8));
net/openvswitch/actions.c
155
if (ethertype == htons(ETH_P_TEB))
net/openvswitch/actions.c
313
if (skb->protocol == htons(ETH_P_TEB))
net/openvswitch/actions.c
326
if (nh->frag_off & htons(IP_OFFSET))
net/openvswitch/actions.c
449
csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8));
net/openvswitch/actions.c
782
if (key->eth.type == htons(ETH_P_IP)) {
net/openvswitch/actions.c
798
} else if (key->eth.type == htons(ETH_P_IPV6)) {
net/openvswitch/conntrack.c
1156
info->range.min_proto.all = htons(nla_get_u16(a));
net/openvswitch/conntrack.c
1162
info->range.max_proto.all = htons(nla_get_u16(a));
net/openvswitch/conntrack.c
190
key->ct.orig_tp.src = htons(orig->dst.u.icmp.type);
net/openvswitch/conntrack.c
191
key->ct.orig_tp.dst = htons(orig->dst.u.icmp.code);
net/openvswitch/conntrack.c
216
if (key->eth.type == htons(ETH_P_IP) &&
net/openvswitch/conntrack.c
222
} else if (key->eth.type == htons(ETH_P_IPV6) &&
net/openvswitch/conntrack.c
310
if (swkey->eth.type == htons(ETH_P_IP)) {
net/openvswitch/conntrack.c
323
} else if (swkey->eth.type == htons(ETH_P_IPV6)) {
net/openvswitch/conntrack.c
623
if (key->eth.type == htons(ETH_P_IP))
net/openvswitch/conntrack.c
625
else if (key->eth.type == htons(ETH_P_IPV6))
net/openvswitch/conntrack.c
645
if (key->eth.type == htons(ETH_P_IP))
net/openvswitch/conntrack.c
647
else if (key->eth.type == htons(ETH_P_IPV6))
net/openvswitch/flow.c
1108
key->eth.type != htons(ETH_P_IP))
net/openvswitch/flow.c
1111
(key->eth.type != htons(ETH_P_IPV6) ||
net/openvswitch/flow.c
462
key_vh->tci = vh->tci | htons(VLAN_CFI_MASK);
net/openvswitch/flow.c
495
key->eth.vlan.tci = htons(skb->vlan_tci) | htons(VLAN_CFI_MASK);
net/openvswitch/flow.c
531
return htons(ETH_P_802_2);
net/openvswitch/flow.c
534
return htons(0);
net/openvswitch/flow.c
540
return htons(ETH_P_802_2);
net/openvswitch/flow.c
547
return htons(ETH_P_802_2);
net/openvswitch/flow.c
558
key->tp.src = htons(icmp->icmp6_type);
net/openvswitch/flow.c
559
key->tp.dst = htons(icmp->icmp6_code);
net/openvswitch/flow.c
59
#define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF))
net/openvswitch/flow.c
684
if (key->eth.type == htons(ETH_P_IP)) {
net/openvswitch/flow.c
707
offset = nh->frag_off & htons(IP_OFFSET);
net/openvswitch/flow.c
713
if (nh->frag_off & htons(IP_MF) ||
net/openvswitch/flow.c
752
key->tp.src = htons(icmp->type);
net/openvswitch/flow.c
753
key->tp.dst = htons(icmp->code);
net/openvswitch/flow.c
759
} else if (key->eth.type == htons(ETH_P_ARP) ||
net/openvswitch/flow.c
760
key->eth.type == htons(ETH_P_RARP)) {
net/openvswitch/flow.c
767
arp->ar_hrd == htons(ARPHRD_ETHER) &&
net/openvswitch/flow.c
768
arp->ar_pro == htons(ETH_P_IP) &&
net/openvswitch/flow.c
816
} else if (key->eth.type == htons(ETH_P_IPV6)) {
net/openvswitch/flow.c
878
} else if (key->eth.type == htons(ETH_P_NSH)) {
net/openvswitch/flow.c
942
if (unlikely(key->eth.type == htons(0)))
net/openvswitch/flow.c
949
if (key->eth.cvlan.tci & htons(VLAN_CFI_MASK))
net/openvswitch/flow.c
989
if (skb->protocol == htons(ETH_P_TEB))
net/openvswitch/flow.h
171
return key->eth.type == htons(ETH_P_IPV6) &&
net/openvswitch/flow.h
174
(key->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) ||
net/openvswitch/flow.h
175
key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT));
net/openvswitch/flow_netlink.c
1033
if (!(tci & htons(VLAN_CFI_MASK))) {
net/openvswitch/flow_netlink.c
1056
htons(VLAN_CFI_MASK));
net/openvswitch/flow_netlink.c
1058
htons(VLAN_CFI_MASK));
net/openvswitch/flow_netlink.c
1077
if (tpid != htons(0xffff)) {
net/openvswitch/flow_netlink.c
1082
if (!(tci & htons(VLAN_CFI_MASK))) {
net/openvswitch/flow_netlink.c
1138
encap_valid = !!(match->key->eth.vlan.tci & htons(VLAN_CFI_MASK));
net/openvswitch/flow_netlink.c
1158
eth_type = htons(0xffff);
net/openvswitch/flow_netlink.c
1520
SW_FLOW_KEY_PUT(match, eth.type, htons(ETH_P_802_2), is_mask);
net/openvswitch/flow_netlink.c
1604
if (!is_mask && (arp_key->arp_op & htons(0xff00))) {
net/openvswitch/flow_netlink.c
1695
htons(icmp_key->icmp_type), is_mask);
net/openvswitch/flow_netlink.c
1697
htons(icmp_key->icmp_code), is_mask);
net/openvswitch/flow_netlink.c
1706
htons(icmpv6_key->icmpv6_type), is_mask);
net/openvswitch/flow_netlink.c
1708
htons(icmpv6_key->icmpv6_code), is_mask);
net/openvswitch/flow_netlink.c
1833
SW_FLOW_KEY_PUT(match, eth.vlan.tci, htons(0xffff), true);
net/openvswitch/flow_netlink.c
1834
SW_FLOW_KEY_PUT(match, eth.cvlan.tci, htons(0xffff), true);
net/openvswitch/flow_netlink.c
192
if (match->key->eth.type == htons(ETH_P_ARP)
net/openvswitch/flow_netlink.c
193
|| match->key->eth.type == htons(ETH_P_RARP)) {
net/openvswitch/flow_netlink.c
195
if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
net/openvswitch/flow_netlink.c
1951
__be16 eth_type = !is_mask ? vh->tpid : htons(0xffff);
net/openvswitch/flow_netlink.c
201
if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
net/openvswitch/flow_netlink.c
205
if (match->key->eth.type == htons(ETH_P_IP)) {
net/openvswitch/flow_netlink.c
2061
if (swkey->eth.type == htons(ETH_P_802_2)) {
net/openvswitch/flow_netlink.c
207
if (match->mask && match->mask->key.eth.type == htons(0xffff)) {
net/openvswitch/flow_netlink.c
2087
if (swkey->eth.type == htons(ETH_P_IP)) {
net/openvswitch/flow_netlink.c
2100
} else if (swkey->eth.type == htons(ETH_P_IPV6)) {
net/openvswitch/flow_netlink.c
2124
} else if (swkey->eth.type == htons(ETH_P_NSH)) {
net/openvswitch/flow_netlink.c
2127
} else if (swkey->eth.type == htons(ETH_P_ARP) ||
net/openvswitch/flow_netlink.c
2128
swkey->eth.type == htons(ETH_P_RARP)) {
net/openvswitch/flow_netlink.c
2138
arp_key->arp_op = htons(output->ip.proto);
net/openvswitch/flow_netlink.c
2156
if ((swkey->eth.type == htons(ETH_P_IP) ||
net/openvswitch/flow_netlink.c
2157
swkey->eth.type == htons(ETH_P_IPV6)) &&
net/openvswitch/flow_netlink.c
2190
} else if (swkey->eth.type == htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
2200
} else if (swkey->eth.type == htons(ETH_P_IPV6) &&
net/openvswitch/flow_netlink.c
2212
if (swkey->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) ||
net/openvswitch/flow_netlink.c
2213
swkey->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
net/openvswitch/flow_netlink.c
242
if (match->key->eth.type == htons(ETH_P_IPV6)) {
net/openvswitch/flow_netlink.c
244
if (match->mask && match->mask->key.eth.type == htons(0xffff)) {
net/openvswitch/flow_netlink.c
277
htons(NDISC_NEIGHBOUR_SOLICITATION) ||
net/openvswitch/flow_netlink.c
278
match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
net/openvswitch/flow_netlink.c
286
if (match->mask && (match->mask->key.tp.src == htons(0xff)))
net/openvswitch/flow_netlink.c
2887
if (eth_type != htons(ETH_P_IP))
net/openvswitch/flow_netlink.c
2910
if (eth_type != htons(ETH_P_IPV6))
net/openvswitch/flow_netlink.c
293
if (match->key->eth.type == htons(ETH_P_NSH)) {
net/openvswitch/flow_netlink.c
2938
if ((eth_type != htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
2939
eth_type != htons(ETH_P_IPV6)) ||
net/openvswitch/flow_netlink.c
2946
if ((eth_type != htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
2947
eth_type != htons(ETH_P_IPV6)) ||
net/openvswitch/flow_netlink.c
296
match->mask->key.eth.type == htons(0xffff)) {
net/openvswitch/flow_netlink.c
2961
if ((eth_type != htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
2962
eth_type != htons(ETH_P_IPV6)) ||
net/openvswitch/flow_netlink.c
3241
vlan_tci = htons(0);
net/openvswitch/flow_netlink.c
3250
if (!(vlan->vlan_tci & htons(VLAN_CFI_MASK)))
net/openvswitch/flow_netlink.c
3265
if (vlan_tci & htons(VLAN_CFI_MASK) ||
net/openvswitch/flow_netlink.c
3266
(eth_type != htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
3267
eth_type != htons(ETH_P_IPV6) &&
net/openvswitch/flow_netlink.c
3268
eth_type != htons(ETH_P_ARP) &&
net/openvswitch/flow_netlink.c
3269
eth_type != htons(ETH_P_RARP) &&
net/openvswitch/flow_netlink.c
3293
if (vlan_tci & htons(VLAN_CFI_MASK) ||
net/openvswitch/flow_netlink.c
3294
(eth_type != htons(ETH_P_IP) &&
net/openvswitch/flow_netlink.c
3295
eth_type != htons(ETH_P_IPV6) &&
net/openvswitch/flow_netlink.c
3296
eth_type != htons(ETH_P_ARP) &&
net/openvswitch/flow_netlink.c
3297
eth_type != htons(ETH_P_RARP) &&
net/openvswitch/flow_netlink.c
3307
if (vlan_tci & htons(VLAN_CFI_MASK) ||
net/openvswitch/flow_netlink.c
3323
if (proto == htons(ETH_P_TEB) &&
net/openvswitch/flow_netlink.c
3330
eth_type = htons(0);
net/openvswitch/flow_netlink.c
3387
if (vlan_tci & htons(VLAN_CFI_MASK))
net/openvswitch/flow_netlink.c
3408
if (eth_type != htons(ETH_P_NSH))
net/openvswitch/vport-vxlan.c
93
conf.dst_port = htons(nla_get_u16(a));
net/openvswitch/vport.c
550
skb->protocol = htons(ETH_P_TEB);
net/packet/af_packet.c
1849
return likely(eth_hdr(skb)->h_proto == htons(ETH_P_8021Q));
net/packet/af_packet.c
1926
if ((!skb->protocol || skb->protocol == htons(ETH_P_ALL)) &&
net/phonet/af_phonet.c
181
skb->protocol = htons(ETH_P_PHONET);
net/phonet/pep-gprs.c
184
case htons(ETH_P_IP):
net/phonet/pep-gprs.c
185
case htons(ETH_P_IPV6):
net/phonet/pep-gprs.c
42
return htons(0);
net/phonet/pep-gprs.c
46
return htons(ETH_P_IP);
net/phonet/pep-gprs.c
48
return htons(ETH_P_IPV6);
net/phonet/pep-gprs.c
50
return htons(0);
net/psp/psp_main.c
171
uh->dest = htons(PSP_DEFAULT_UDP_PORT);
net/psp/psp_main.c
205
uh->source = htons((((u64)hash * (max - min)) >> 32) + min);
net/psp/psp_main.c
210
uh->len = htons(udp_len);
net/psp/psp_main.c
240
if (skb->protocol == htons(ETH_P_IP)) {
net/psp/psp_main.c
246
} else if (skb->protocol == htons(ETH_P_IPV6)) {
net/psp/psp_main.c
284
if (proto == htons(ETH_P_IP))
net/psp/psp_main.c
286
else if (proto == htons(ETH_P_IPV6))
net/psp/psp_main.c
294
if (proto == htons(ETH_P_IP)) {
net/psp/psp_main.c
312
if (unlikely(uh->dest != htons(PSP_DEFAULT_UDP_PORT)))
net/psp/psp_main.c
329
if (proto == htons(ETH_P_IP)) {
net/psp/psp_main.c
333
iph->tot_len = htons(ntohs(iph->tot_len) - encap);
net/psp/psp_main.c
340
ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) - encap);
net/rds/ib_cm.c
1010
sin->sin_port = htons(RDS_PORT);
net/rds/ib_cm.c
1023
sin6->sin6_port = htons(RDS_CM_PORT);
net/rds/rdma_transport.c
257
sin.sin_port = htons(RDS_PORT);
net/rds/rdma_transport.c
267
sin6.sin6_port = htons(RDS_CM_PORT);
net/rds/tcp_connect.c
172
sin6.sin6_port = htons(port);
net/rds/tcp_connect.c
174
sin.sin_port = htons(port);
net/rds/tcp_connect.c
187
sin6.sin6_port = htons(RDS_TCP_PORT);
net/rds/tcp_connect.c
195
sin.sin_port = htons(RDS_TCP_PORT);
net/rds/tcp_listen.c
411
sin6->sin6_port = htons(RDS_TCP_PORT);
net/rds/tcp_listen.c
419
sin->sin_port = htons(RDS_TCP_PORT);
net/rxrpc/conn_event.c
149
pkt.whdr.serviceId = htons(conn->service_id);
net/rxrpc/conn_event.c
169
pkt.ack.maxSkew = htons(skb ? skb->priority : 0);
net/rxrpc/local_event.c
66
whdr.serviceId = htons(sp->hdr.serviceId);
net/rxrpc/output.c
184
whdr->serviceId = htons(call->dest_srx.srx_service);
net/rxrpc/output.c
403
pkt.whdr.serviceId = htons(call->dest_srx.srx_service);
net/rxrpc/output.c
561
whdr->serviceId = htons(call->conn->service_id);
net/rxrpc/output.c
775
whdr.serviceId = htons(conn->service_id);
net/rxrpc/output.c
836
.serviceId = htons(sp->hdr.serviceId),
net/rxrpc/peer_object.c
176
htons(7000), htons(7001), IPPROTO_UDP, 0, 0);
net/rxrpc/peer_object.c
191
fl6->fl6_dport = htons(7001);
net/rxrpc/peer_object.c
192
fl6->fl6_sport = htons(7000);
net/rxrpc/rxgk.c
449
txb->cksum = htons(gk->key_number);
net/rxrpc/rxgk.c
670
whdr->serviceId = htons(conn->service_id);
net/rxrpc/rxgk.c
807
h.whdr.cksum = htons(gk->key_number);
net/rxrpc/rxgk.c
808
h.whdr.serviceId = htons(conn->service_id);
net/rxrpc/rxkad.c
386
txb->cksum = htons(y);
net/rxrpc/rxkad.c
676
whdr.serviceId = htons(conn->service_id);
net/rxrpc/rxkad.c
835
h.whdr.serviceId = htons(conn->service_id);
net/rxrpc/rxperf.c
205
srx.transport.sin6.sin6_port = htons(RXPERF_PORT);
net/sched/act_connmark.c
50
case htons(ETH_P_IP):
net/sched/act_connmark.c
56
case htons(ETH_P_IPV6):
net/sched/act_csum.c
397
switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) {
net/sched/act_ct.c
792
case htons(ETH_P_IP):
net/sched/act_ct.c
795
case htons(ETH_P_IPV6):
net/sched/act_ctinfo.c
100
case htons(ETH_P_IP):
net/sched/act_ctinfo.c
107
case htons(ETH_P_IPV6):
net/sched/act_ife.c
56
edata = htons(edata);
net/sched/act_ife.c
856
oethh->h_proto = htons(p->eth_type);
net/sched/act_mpls.c
296
htons(ETH_P_MPLS_UC));
net/sched/act_nat.c
170
} else if ((iph->frag_off & htons(IP_OFFSET)) ||
net/sched/act_nat.c
178
switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) {
net/sched/act_pedit.c
339
case htons(ETH_P_IP): {
net/sched/act_pedit.c
348
case htons(ETH_P_IPV6):
net/sched/act_skbedit.c
58
case htons(ETH_P_IP):
net/sched/act_skbedit.c
65
case htons(ETH_P_IPV6):
net/sched/act_skbmod.c
207
p->eth_type = htons(eth_type);
net/sched/act_vlan.c
178
case htons(ETH_P_8021Q):
net/sched/act_vlan.c
179
case htons(ETH_P_8021AD):
net/sched/act_vlan.c
189
push_proto = htons(ETH_P_8021Q);
net/sched/cls_api.c
1761
tp->protocol != htons(ETH_P_ALL))
net/sched/cls_flow.c
156
case htons(ETH_P_IP):
net/sched/cls_flow.c
158
case htons(ETH_P_IPV6):
net/sched/cls_flow.c
169
case htons(ETH_P_IP):
net/sched/cls_flow.c
171
case htons(ETH_P_IPV6):
net/sched/cls_flower.c
1131
key_val->type = htons(ETH_P_PPP_SES);
net/sched/cls_flower.c
1144
if (key_val->ppp_proto == htons(PPP_IP)) {
net/sched/cls_flower.c
1145
key->basic.n_proto = htons(ETH_P_IP);
net/sched/cls_flower.c
1147
} else if (key_val->ppp_proto == htons(PPP_IPV6)) {
net/sched/cls_flower.c
1148
key->basic.n_proto = htons(ETH_P_IPV6);
net/sched/cls_flower.c
1150
} else if (key_val->ppp_proto == htons(PPP_MPLS_UC)) {
net/sched/cls_flower.c
1151
key->basic.n_proto = htons(ETH_P_MPLS_UC);
net/sched/cls_flower.c
1153
} else if (key_val->ppp_proto == htons(PPP_MPLS_MC)) {
net/sched/cls_flower.c
1154
key->basic.n_proto = htons(ETH_P_MPLS_MC);
net/sched/cls_flower.c
1922
if (key->basic.n_proto == htons(ETH_P_PPP_SES))
net/sched/cls_flower.c
1925
if (key->basic.n_proto == htons(ETH_P_IP) ||
net/sched/cls_flower.c
1926
key->basic.n_proto == htons(ETH_P_IPV6)) {
net/sched/cls_flower.c
1977
} else if (key->basic.n_proto == htons(ETH_P_IP) &&
net/sched/cls_flower.c
1987
} else if (key->basic.n_proto == htons(ETH_P_IPV6) &&
net/sched/cls_flower.c
1997
} else if (key->basic.n_proto == htons(ETH_P_MPLS_UC) ||
net/sched/cls_flower.c
1998
key->basic.n_proto == htons(ETH_P_MPLS_MC)) {
net/sched/cls_flower.c
2002
} else if (key->basic.n_proto == htons(ETH_P_ARP) ||
net/sched/cls_flower.c
2003
key->basic.n_proto == htons(ETH_P_RARP)) {
net/sched/cls_flower.c
2024
} else if (key->basic.n_proto == htons(ETH_P_CFM)) {
net/sched/cls_flower.c
3498
if ((key->basic.n_proto == htons(ETH_P_IP) ||
net/sched/cls_flower.c
3499
key->basic.n_proto == htons(ETH_P_IPV6)) &&
net/sched/cls_flower.c
3561
else if (key->basic.n_proto == htons(ETH_P_IP) &&
net/sched/cls_flower.c
3572
else if (key->basic.n_proto == htons(ETH_P_IPV6) &&
net/sched/cls_flower.c
3583
else if ((key->basic.n_proto == htons(ETH_P_ARP) ||
net/sched/cls_flower.c
3584
key->basic.n_proto == htons(ETH_P_RARP)) &&
net/sched/em_ipset.c
63
case htons(ETH_P_IP):
net/sched/em_ipset.c
69
case htons(ETH_P_IPV6):
net/sched/em_ipt.c
216
case htons(ETH_P_IP):
net/sched/em_ipt.c
222
case htons(ETH_P_IPV6):
net/sched/sch_cake.c
1622
case htons(ETH_P_IP):
net/sched/sch_cake.c
1642
case htons(ETH_P_IPV6):
net/sched/sch_cake.c
1662
case htons(ETH_P_ARP):
net/sched/sch_cake.c
595
if (skb_protocol(skb, true) != htons(ETH_P_IP))
net/sched/sch_dualpi2.c
313
case htons(ETH_P_IP):
net/sched/sch_dualpi2.c
321
case htons(ETH_P_IPV6):
net/sched/sch_frag.c
115
} else if (skb_protocol(skb, true) == htons(ETH_P_IPV6)) {
net/sched/sch_frag.c
98
if (skb_protocol(skb, true) == htons(ETH_P_IP)) {
net/sctp/associola.c
273
p->length = htons(sizeof(*p) + SCTP_AUTH_RANDOM_LENGTH);
net/sctp/auth.c
679
p->param_hdr.length = htons(param_len + 1);
net/sctp/auth.c
709
htons(hmacs->shmac_idents[i]);
net/sctp/auth.c
711
htons(sizeof(struct sctp_paramhdr) +
net/sctp/auth.c
945
htons(sizeof(struct sctp_paramhdr) + 2);
net/sctp/auth.c
946
auth_hmacs->hmac_ids[0] = htons(SCTP_AUTH_HMAC_ID_SHA1);
net/sctp/auth.c
960
htons(sizeof(struct sctp_paramhdr));
net/sctp/bind_addr.c
160
addr->a.v4.sin_port = htons(bp->port);
net/sctp/bind_addr.c
280
!af->from_addr_param(&addr, rawaddr, htons(port), 0)) {
net/sctp/diag.c
314
if (r->id.idiag_sport != htons(assoc->base.bind_addr.port) &&
net/sctp/diag.c
317
if (r->id.idiag_dport != htons(assoc->peer.port) &&
net/sctp/diag.c
40
r->id.idiag_sport = htons(asoc->base.bind_addr.port);
net/sctp/diag.c
41
r->id.idiag_dport = htons(asoc->peer.port);
net/sctp/endpointola.c
258
(htons(ep->base.bind_addr.port) == laddr->v4.sin_port)) {
net/sctp/input.c
1038
.lport = htons(ep->base.bind_addr.port),
net/sctp/input.c
899
if (x->lport != htons(t->asoc->base.bind_addr.port))
net/sctp/input.c
913
htons(t->asoc->base.bind_addr.port),
net/sctp/input.c
954
arg.lport = htons(t->asoc->base.bind_addr.port);
net/sctp/ipv6.c
313
fl6->fl6_sport = htons(asoc->base.bind_addr.port);
net/sctp/ipv6.c
343
sctp_v6_to_addr(&dst_saddr, &fl6->saddr, htons(bp->port));
net/sctp/ipv6.c
610
param->v6.param_hdr.length = htons(length);
net/sctp/ipv6.c
848
addr->v4.sin_port = htons(asoc->peer.port);
net/sctp/ipv6.c
857
addr->v6.sin6_port = htons(asoc->peer.port);
net/sctp/output.c
608
sh->source = htons(packet->source_port);
net/sctp/output.c
609
sh->dest = htons(packet->destination_port);
net/sctp/protocol.c
1067
df = htons(IP_DF);
net/sctp/protocol.c
164
laddr.v4.sin_port = htons(bp->port);
net/sctp/protocol.c
280
param->v4.param_hdr.length = htons(length);
net/sctp/protocol.c
444
fl4->fl4_sport = htons(asoc->base.bind_addr.port);
net/sctp/protocol.c
474
sctp_v4_dst_saddr(&dst_saddr, fl4, htons(bp->port));
net/sctp/protocol.c
857
udp_conf.local_udp_port = htons(net->sctp.udp_port);
net/sctp/protocol.c
875
udp_conf.local_udp_port = htons(net->sctp.udp_port);
net/sctp/protocol.c
970
sin->sin_port = htons(asoc->peer.port);
net/sctp/sm_make_chunk.c
1058
chunk->chunk_hdr->length = htons(chunklen + len);
net/sctp/sm_make_chunk.c
1082
phdr.type = htons(chunk->chunk_hdr->type);
net/sctp/sm_make_chunk.c
1168
hbinfo.param_hdr.length = htons(sizeof(hbinfo));
net/sctp/sm_make_chunk.c
1236
retval->chunk_hdr->length = htons(ntohs(retval->chunk_hdr->length) + len);
net/sctp/sm_make_chunk.c
1336
auth_hdr.hmac_id = htons(hmac_desc->hmac_id);
net/sctp/sm_make_chunk.c
1337
auth_hdr.shkey_id = htons(key_id);
net/sctp/sm_make_chunk.c
1346
htons(ntohs(retval->chunk_hdr->length) + hmac_desc->hmac_len);
net/sctp/sm_make_chunk.c
144
err.length = htons(len);
net/sctp/sm_make_chunk.c
1443
chunk_hdr->length = htons(sizeof(*chunk_hdr));
net/sctp/sm_make_chunk.c
1538
chunk->chunk_hdr->length = htons(chunklen + padlen + len);
net/sctp/sm_make_chunk.c
1562
htons(ntohs(chunk->chunk_hdr->length) + len);
net/sctp/sm_make_chunk.c
1599
lchunk->subh.data_hdr->ssn = htons(ssn);
net/sctp/sm_make_chunk.c
1686
retval->p.length = htons(*cookie_len);
net/sctp/sm_make_chunk.c
229
init.num_outbound_streams = htons(asoc->c.sinit_num_ostreams);
net/sctp/sm_make_chunk.c
230
init.num_inbound_streams = htons(asoc->c.sinit_max_instreams);
net/sctp/sm_make_chunk.c
2542
if (!af->from_addr_param(&addr, param.addr, htons(asoc->peer.port), 0))
net/sctp/sm_make_chunk.c
2640
htons(asoc->peer.port), 0))
net/sctp/sm_make_chunk.c
2874
param.param_hdr.length = htons(paramlen + addr_param_len);
net/sctp/sm_make_chunk.c
2887
param.param_hdr.length = htons(paramlen + addr_param_len);
net/sctp/sm_make_chunk.c
2931
param.param_hdr.length = htons(len);
net/sctp/sm_make_chunk.c
3003
ack_param.param_hdr.length = htons(sizeof(ack_param) +
net/sctp/sm_make_chunk.c
3014
err_param.length = htons(err_param_len + asconf_param_len);
net/sctp/sm_make_chunk.c
3056
if (!af->from_addr_param(&addr, addr_param, htons(asoc->peer.port), 0))
net/sctp/sm_make_chunk.c
328
sat.param_hdr.length = htons(SCTP_SAT_LEN(num_types));
net/sctp/sm_make_chunk.c
3334
if (!af->from_addr_param(&addr, addr_param, htons(bp->port), 0))
net/sctp/sm_make_chunk.c
340
ext_param.param_hdr.length = htons(sizeof(ext_param) + num_ext);
net/sctp/sm_make_chunk.c
350
aiparam.param_hdr.length = htons(sizeof(aiparam));
net/sctp/sm_make_chunk.c
3668
outreq.param_hdr.length = htons(outlen);
net/sctp/sm_make_chunk.c
3681
inreq.param_hdr.length = htons(inlen);
net/sctp/sm_make_chunk.c
3714
tsnreq.param_hdr.length = htons(length);
net/sctp/sm_make_chunk.c
3747
addstrm.param_hdr.length = htons(size);
net/sctp/sm_make_chunk.c
3748
addstrm.number_of_streams = htons(out);
net/sctp/sm_make_chunk.c
3757
addstrm.param_hdr.length = htons(size);
net/sctp/sm_make_chunk.c
3758
addstrm.number_of_streams = htons(in);
net/sctp/sm_make_chunk.c
3791
resp.param_hdr.length = htons(length);
net/sctp/sm_make_chunk.c
3829
tsnresp.param_hdr.length = htons(length);
net/sctp/sm_make_chunk.c
396
initack.num_outbound_streams = htons(asoc->c.sinit_num_ostreams);
net/sctp/sm_make_chunk.c
397
initack.num_inbound_streams = htons(asoc->c.sinit_max_instreams);
net/sctp/sm_make_chunk.c
490
ext_param.param_hdr.length = htons(sizeof(ext_param) + num_ext);
net/sctp/sm_make_chunk.c
499
aiparam.param_hdr.length = htons(sizeof(aiparam));
net/sctp/sm_make_chunk.c
726
dp.stream = htons(sinfo->sinfo_stream);
net/sctp/sm_make_chunk.c
769
sack.num_gap_ack_blocks = htons(num_gabs);
net/sctp/sm_make_chunk.c
770
sack.num_dup_tsns = htons(num_dup_tsns);
net/sctp/sm_statefuns.c
1349
errhdr->length = htons(len);
net/sctp/sm_statefuns.c
2572
bht.param_hdr.length = htons(sizeof(bht));
net/sctp/socket.c
1240
inet_sk(sk)->inet_dport = htons(asoc->peer.port);
net/sctp/socket.c
1724
daddr->v4.sin_port = htons(asoc->peer.port);
net/sctp/socket.c
1735
daddr->v6.sin6_port = htons(asoc->peer.port);
net/sctp/socket.c
432
addr->v4.sin_port = htons(snum);
net/sctp/socket.c
453
inet_sk(sk)->inet_sport = htons(inet_sk(sk)->inet_num);
net/sctp/socket.c
4865
newinet->inet_dport = htons(asoc->peer.port);
net/sctp/socket.c
5081
sp->udp_port = htons(net->sctp.udp_port);
net/sctp/socket.c
5082
sp->encap_port = htons(net->sctp.encap_port);
net/sctp/socket.c
6260
temp.v4.sin_port = htons(port);
net/sctp/socket.c
718
sa_addr->v4.sin_port != htons(bp->port)) {
net/sctp/socket.c
724
sa_addr->v4.sin_port = htons(bp->port);
net/sctp/socket.c
839
htons(bp->port);
net/sctp/socket.c
8560
addr.v4.sin_port = htons(snum);
net/sctp/socket.c
8811
port = htons(inet_sk(sk)->inet_num);
net/sctp/socket.c
918
addr->v4.sin_port = htons(sp->ep->base.bind_addr.port);
net/sctp/stream.c
326
nstr_list[i] = htons(str_list[i]);
net/sctp/stream_interleave.c
33
dp.stream = htons(sinfo->sinfo_stream);
net/sctp/sysctl.c
554
sctp_sk(sk)->udp_port = htons(net->sctp.udp_port);
net/sctp/tsnmap.c
331
gabs[ngaps].start = htons(start);
net/sctp/tsnmap.c
332
gabs[ngaps].end = htons(end);
net/smc/smc_cdc.c
155
peer->seqno = htons(conn->tx_cdc_seq_fin); /* seqno last compl. tx */
net/smc/smc_cdc.h
202
peer->wrap = htons(save->wrap);
net/smc/smc_cdc.h
214
peer->seqno = htons(local->seqno);
net/smc/smc_clc.c
1071
clc->hdr.length = htons(SMCD_CLC_ACCEPT_CONFIRM_LEN);
net/smc/smc_clc.c
1074
clc->d1.chid = htons(chid);
net/smc/smc_clc.c
1084
clc->hdr.length = htons(len);
net/smc/smc_clc.c
1132
clc->hdr.length = htons(SMCR_CLC_ACCEPT_CONFIRM_LEN);
net/smc/smc_clc.c
1149
clc->hdr.length = htons(len);
net/smc/smc_clc.c
459
fce_v2x->feature_mask = htons(ini->feature_mask);
net/smc/smc_clc.c
834
dclc.hdr.length = htons(send_len);
net/smc/smc_clc.c
895
pclc_base->iparea_offset = htons(sizeof(*pclc_smcd));
net/smc/smc_clc.c
923
htons(smc_ism_get_chid(ini->ism_dev[0]));
net/smc/smc_clc.c
939
pclc_smcd->v2_ext_offset = htons(v2_ext_offset);
net/smc/smc_clc.c
942
v2_ext->feature_mask = htons(SMC_FEATURE_MASK);
net/smc/smc_clc.c
959
v2_ext->hdr.smcd_v2_ext_offset = htons(sizeof(*v2_ext) -
net/smc/smc_clc.c
972
htons(smc_ism_get_chid(ini->ism_dev[i]));
net/smc/smc_clc.c
997
pclc_base->hdr.length = htons(plen);
net/smc/smc_diag.c
44
r->id.idiag_sport = htons(smc->clcsock->sk->sk_num);
net/sunrpc/addr.c
345
((struct sockaddr_in *)sap)->sin_port = htons(port);
net/sunrpc/addr.c
348
((struct sockaddr_in6 *)sap)->sin6_port = htons(port);
net/sunrpc/rpcb_clnt.c
303
.sin_port = htons(RPCBIND_PORT),
net/sunrpc/rpcb_clnt.c
391
((struct sockaddr_in *)srvaddr)->sin_port = htons(RPCBIND_PORT);
net/sunrpc/rpcb_clnt.c
394
((struct sockaddr_in6 *)srvaddr)->sin6_port = htons(RPCBIND_PORT);
net/sunrpc/svc.c
1038
.sin_port = htons(port),
net/sunrpc/svc.c
1086
.sin6_port = htons(port),
net/sunrpc/svc_xprt.c
351
.sin_port = htons(port),
net/sunrpc/svc_xprt.c
357
.sin6_port = htons(port),
net/sunrpc/xprtsock.c
3333
if (((struct sockaddr_in *)addr)->sin_port != htons(0))
net/sunrpc/xprtsock.c
3339
if (((struct sockaddr_in6 *)addr)->sin6_port != htons(0))
net/sunrpc/xprtsock.c
3421
if (((struct sockaddr_in *)addr)->sin_port != htons(0))
net/sunrpc/xprtsock.c
3427
if (((struct sockaddr_in6 *)addr)->sin6_port != htons(0))
net/sunrpc/xprtsock.c
3509
if (((struct sockaddr_in *)addr)->sin_port != htons(0))
net/sunrpc/xprtsock.c
3515
if (((struct sockaddr_in6 *)addr)->sin6_port != htons(0))
net/tipc/bearer.c
460
b->pt.type = htons(ETH_P_TIPC);
net/tipc/bearer.c
513
skb->protocol = htons(ETH_P_TIPC);
net/tipc/bearer.c
808
tn->loopback_pt.type = htons(ETH_P_TIPC);
net/tipc/link.c
1460
gacks[n].ack = htons(expect - 1);
net/tipc/link.c
1461
gacks[n].gap = htons(seqno - expect);
net/tipc/link.c
1476
gacks[n].ack = htons(seqno);
net/tipc/link.c
1513
ga->len = htons(len);
net/tipc/monitor.c
109
return (__force __u16)htons(val);
net/tipc/netlink_compat.c
106
tlv->tlv_type = htons(type);
net/tipc/netlink_compat.c
107
tlv->tlv_len = htons(TLV_LENGTH(len));
net/tipc/udp_media.c
179
if (dst->proto == htons(ETH_P_IP)) {
net/tipc/udp_media.c
250
skb_set_inner_protocol(skb, htons(ETH_P_TIPC));
net/tipc/udp_media.c
348
src.proto = htons(ETH_P_IP);
net/tipc/udp_media.c
356
src.proto = htons(ETH_P_IPV6);
net/tipc/udp_media.c
594
addr->proto = htons(ETH_P_IP);
net/tipc/udp_media.c
603
addr->proto = htons(ETH_P_IPV6);
net/tipc/udp_media.c
729
if (local.proto == htons(ETH_P_IP)) {
net/tipc/udp_media.c
747
} else if (local.proto == htons(ETH_P_IPV6)) {
net/wireless/util.c
2776
msg->len = htons(6);
net/wireless/util.c
517
*hdr_proto != htons(ETH_P_AARP) &&
net/wireless/util.c
518
*hdr_proto != htons(ETH_P_IPX)) &&
net/wireless/util.c
551
payload.eth.h_proto = htons(skb->len - hdrlen);
net/wireless/util.c
640
tmp.h_proto = htons(skb->len - hdrlen);
net/wireless/util.c
965
case htons(ETH_P_IP):
net/wireless/util.c
968
case htons(ETH_P_IPV6):
net/wireless/util.c
971
case htons(ETH_P_MPLS_UC):
net/wireless/util.c
972
case htons(ETH_P_MPLS_MC): {
net/wireless/util.c
984
case htons(ETH_P_80221):
net/x25/x25_dev.c
167
skb->protocol = htons(ETH_P_X25);
net/x25/x25_dev.c
190
skb->protocol = htons(ETH_P_X25);
net/xfrm/xfrm_inout.h
30
XFRM_MODE_SKB_CB(skb)->frag_off = htons(IP_DF);
net/xfrm/xfrm_input.c
187
skb->protocol = htons(ETH_P_IP);
net/xfrm/xfrm_input.c
219
iph->tot_len = htons(skb->len);
net/xfrm/xfrm_input.c
241
skb->protocol = htons(ETH_P_IP);
net/xfrm/xfrm_input.c
278
skb->protocol = htons(ETH_P_IPV6);
net/xfrm/xfrm_input.c
309
skb->protocol = htons(ETH_P_IPV6);
net/xfrm/xfrm_input.c
322
ip6h->payload_len = htons(skb->len - size);
net/xfrm/xfrm_input.c
406
ip_hdr(skb)->tot_len = htons(skb->len + ihl);
net/xfrm/xfrm_input.c
425
ipv6_hdr(skb)->payload_len = htons(skb->len + ihl -
net/xfrm/xfrm_interface_core.c
484
if (skb->protocol == htons(ETH_P_IPV6)) {
net/xfrm/xfrm_interface_core.c
493
if (!(ip_hdr(skb)->frag_off & htons(IP_DF)))
net/xfrm/xfrm_interface_core.c
535
case htons(ETH_P_IPV6):
net/xfrm/xfrm_interface_core.c
550
case htons(ETH_P_IP):
net/xfrm/xfrm_ipcomp.c
253
ipch->cpi = htons((u16 )ntohl(x->id.spi));
net/xfrm/xfrm_iptfs.c
1938
h->block_offset = htons(blkoff);
net/xfrm/xfrm_iptfs.c
2202
skb->protocol = x->outer_mode.family == AF_INET ? htons(ETH_P_IP) :
net/xfrm/xfrm_iptfs.c
2203
htons(ETH_P_IPV6);
net/xfrm/xfrm_iptfs.c
2390
top_iph->frag_off = htons(IP_DF);
net/xfrm/xfrm_iptfs.c
683
skb->protocol = htons(ETH_P_IP);
net/xfrm/xfrm_iptfs.c
693
skb->protocol = htons(ETH_P_IPV6);
net/xfrm/xfrm_nat_keepalive.c
136
uh->len = htons(skb->len);
net/xfrm/xfrm_output.c
275
bool small_ipv6 = (skb->protocol == htons(ETH_P_IPV6)) && (skb->len <= IPV6_MIN_MTU);
net/xfrm/xfrm_output.c
307
0 : (XFRM_MODE_SKB_CB(skb)->frag_off & htons(IP_DF));
net/xfrm/xfrm_output.c
414
skb->protocol = htons(ETH_P_IP);
net/xfrm/xfrm_output.c
437
skb->protocol = htons(ETH_P_IPV6);
net/xfrm/xfrm_output.c
841
if (!(ip_hdr(skb)->frag_off & htons(IP_DF)) || skb->ignore_df)
net/xfrm/xfrm_output.c
848
skb->protocol = htons(ETH_P_IP);
net/xfrm/xfrm_output.c
900
skb->protocol = htons(ETH_P_IPV6);
net/xfrm/xfrm_output.c
938
case htons(ETH_P_IP):
net/xfrm/xfrm_output.c
940
case htons(ETH_P_IPV6):
net/xfrm/xfrm_output.c
952
if (skb->protocol == htons(ETH_P_IP))
net/xfrm/xfrm_output.c
954
else if (skb->protocol == htons(ETH_P_IPV6) &&
net/xfrm/xfrm_state.c
1042
sel->dport_mask = htons(0xffff);
net/xfrm/xfrm_state.c
1044
sel->sport_mask = htons(0xffff);
net/xfrm/xfrm_state.c
1061
sel->dport_mask = htons(0xffff);
net/xfrm/xfrm_state.c
1063
sel->sport_mask = htons(0xffff);
samples/bpf/cookie_uid_helper_example.c
234
si_other.sin_port = htons(PORT);
samples/bpf/parse_simple.c
39
if (eth->h_proto != htons(ETH_P_IP))
samples/bpf/parse_simple.c
45
if (udp->dest == htons(DEFAULT_PKTGEN_UDP_PORT))
samples/bpf/parse_varlen.c
144
if (h_proto == htons(ETH_P_IP))
samples/bpf/parse_varlen.c
146
else if (h_proto == htons(ETH_P_IPV6))
samples/bpf/parse_varlen.c
28
if (tcp->dest == htons(80) || tcp->source == htons(80))
samples/bpf/parse_varlen.c
39
if (udp->dest == htons(DEFAULT_PKTGEN_UDP_PORT) ||
samples/bpf/parse_varlen.c
40
udp->source == htons(DEFAULT_PKTGEN_UDP_PORT)) {
samples/bpf/sock_example.h
18
sock = socket(PF_PACKET, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, htons(ETH_P_ALL));
samples/bpf/sock_example.h
27
sll.sll_protocol = htons(ETH_P_ALL);
samples/bpf/tc_l2_redirect_kern.c
122
if (eth->h_proto == htons(ETH_P_IP)) {
samples/bpf/tc_l2_redirect_kern.c
161
if (eth->h_proto == htons(ETH_P_IP)) {
samples/bpf/tc_l2_redirect_kern.c
173
} else if (eth->h_proto == htons(ETH_P_IPV6)) {
samples/bpf/tc_l2_redirect_kern.c
210
if (eth->h_proto == htons(ETH_P_IP)) {
samples/bpf/tc_l2_redirect_kern.c
218
} else if (eth->h_proto == htons(ETH_P_IPV6)) {
samples/bpf/tc_l2_redirect_kern.c
50
if (eth_proto == htons(ETH_P_IP))
samples/bpf/tc_l2_redirect_kern.c
52
else if (eth_proto == htons(ETH_P_IPV6))
samples/bpf/tc_l2_redirect_kern.c
73
if (eth->h_proto == htons(ETH_P_IP)) {
samples/bpf/tc_l2_redirect_kern.c
86
} else if (eth->h_proto == htons(ETH_P_IPV6)) {
samples/bpf/tcbpf1_kern.c
28
bpf_l3_csum_replace(skb, IP_CSUM_OFF, htons(old_tos), htons(new_tos), 2);
samples/bpf/tcbpf1_kern.c
49
__u16 old_port = htons(load_half(skb, TCP_DPORT_OFF));
samples/bpf/xdp_adjust_tail_kern.c
110
iph->tot_len = htons(
samples/bpf/xdp_adjust_tail_kern.c
150
if (h_proto == htons(ETH_P_IP))
samples/bpf/xdp_adjust_tail_kern.c
99
icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr));
samples/bpf/xdp_fwd_kern.c
133
if (h_proto == htons(ETH_P_IP))
samples/bpf/xdp_fwd_kern.c
135
else if (h_proto == htons(ETH_P_IPV6))
samples/bpf/xdp_fwd_kern.c
38
check += (__force u32)htons(0x0100);
samples/bpf/xdp_fwd_kern.c
62
if (h_proto == htons(ETH_P_IP)) {
samples/bpf/xdp_fwd_kern.c
79
} else if (h_proto == htons(ETH_P_IPV6)) {
samples/bpf/xdp_tx_iptunnel_kern.c
127
set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP));
samples/bpf/xdp_tx_iptunnel_kern.c
135
iph->tot_len = htons(payload_len + sizeof(*iph));
samples/bpf/xdp_tx_iptunnel_kern.c
199
set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IPV6));
samples/bpf/xdp_tx_iptunnel_kern.c
204
ip6h->payload_len = htons(ntohs(payload_len) + sizeof(*ip6h));
samples/bpf/xdp_tx_iptunnel_kern.c
228
if (h_proto == htons(ETH_P_IP))
samples/bpf/xdp_tx_iptunnel_kern.c
230
else if (h_proto == htons(ETH_P_IPV6))
samples/bpf/xdp_tx_iptunnel_user.c
285
vip.dport = htons(min_port++);
security/landlock/net.c
27
.key.data = (__force uintptr_t)htons(port),
security/selinux/hooks.c
4962
ad.u.net->sport = htons(snum);
security/selinux/hooks.c
5103
ad.u.net->dport = htons(snum);
security/selinux/hooks.c
5315
if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
security/selinux/hooks.c
5406
if (skb && skb->protocol == htons(ETH_P_IP))
security/selinux/hooks.c
5408
else if (skb && skb->protocol == htons(ETH_P_IPV6))
security/selinux/hooks.c
5499
if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
security/selinux/hooks.c
5754
if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
security/smack/smack_lsm.c
4265
if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
security/smack/smack_lsm.c
4395
if (skb->protocol == htons(ETH_P_IP))
security/smack/smack_lsm.c
4398
else if (skb->protocol == htons(ETH_P_IPV6))
security/smack/smack_lsm.c
4470
if (skb->protocol == htons(ETH_P_IP))
security/smack/smackfs.c
1473
newname.s6_addr16[i] = htons(scanned[i]);
security/tomoyo/network.c
534
i->port = htons(port);
tools/firmware/ihex2fw.c
279
p->len = htons(p->len);
tools/lib/bpf/netlink.c
775
req.tc.tcm_info = TC_H_MAKE(priority << 16, htons(protocol));
tools/lib/bpf/netlink.c
852
req.tc.tcm_info = TC_H_MAKE(priority << 16, htons(protocol));
tools/lib/bpf/netlink.c
918
req.tc.tcm_info = TC_H_MAKE(priority << 16, htons(protocol));
tools/net/ynl/samples/tc-filter-add.c
134
req->_hdr.tcm_info = TC_H_MAKE(1 << 16, htons(ETH_P_8021Q));
tools/net/ynl/samples/tc-filter-add.c
157
tc_newtfilter_req_set_options_flower_key_eth_type(req, htons(0x8100));
tools/net/ynl/samples/tc-filter-add.c
217
req->_hdr.tcm_info = TC_H_MAKE(1 << 16, htons(ETH_P_8021Q));
tools/testing/selftests/bpf/network_helpers.c
403
sin->sin_port = htons(port);
tools/testing/selftests/bpf/network_helpers.c
417
sin6->sin6_port = htons(port);
tools/testing/selftests/bpf/network_helpers.h
172
s += htons(proto + len);
tools/testing/selftests/bpf/network_helpers.h
206
s += htons(proto + len);
tools/testing/selftests/bpf/prog_tests/bind_perm.c
34
sin->sin_port = htons(port);
tools/testing/selftests/bpf/prog_tests/bind_perm.c
38
sin6->sin6_port = htons(port);
tools/testing/selftests/bpf/prog_tests/cgroup_ancestor.c
121
t.skel->bss->dport = htons(DST_PORT);
tools/testing/selftests/bpf/prog_tests/cgroup_ancestor.c
27
.sin6_port = htons(DST_PORT), };
tools/testing/selftests/bpf/prog_tests/cls_redirect.c
180
.eth = { .h_proto = htons(ETH_P_IP) },
tools/testing/selftests/bpf/prog_tests/cls_redirect.c
189
.dest = htons(ENCAP_PORT),
tools/testing/selftests/bpf/prog_tests/cls_redirect.c
392
skel->rodata->ENCAPSULATION_PORT = htons(ENCAP_PORT);
tools/testing/selftests/bpf/prog_tests/cls_redirect.c
414
skel->rodata->ENCAPSULATION_PORT = htons(ENCAP_PORT);
tools/testing/selftests/bpf/prog_tests/cls_redirect.c
436
skel->rodata->ENCAPSULATION_PORT = htons(ENCAP_PORT);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
131
iph->tot_len = htons(sizeof(*iph) + payload_len);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
132
iph->id = htons(1337);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
146
*ptr = htons(val);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
157
ip6h->payload_len = htons(payload_len);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
172
udph->source = htons(sport);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
173
udph->dest = htons(dport);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
174
udph->len = htons(len);
tools/testing/selftests/bpf/prog_tests/flow_dissector_classification.c
195
greh->protocol = htons(proto);
tools/testing/selftests/bpf/prog_tests/ip_check_defrag.c
226
c->sin6_port = htons(CLIENT_PORT);
tools/testing/selftests/bpf/prog_tests/ip_check_defrag.c
233
c->sin_port = htons(CLIENT_PORT);
tools/testing/selftests/bpf/prog_tests/kfree_skb.c
40
if (CHECK(pkt_v6->eth.h_proto != htons(ETH_P_IPV6), "check_eth",
tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
197
ASSERT_LT(socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)), 0,
tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
207
.sll_protocol = htons(ETH_P_ALL),
tools/testing/selftests/bpf/prog_tests/lwt_redirect.c
111
.sll_protocol = htons(ETH_P_IP),
tools/testing/selftests/bpf/prog_tests/lwt_redirect.c
148
if (eth->h_proto == htons(ETH_P_IP))
tools/testing/selftests/bpf/prog_tests/lwt_reroute.c
79
.sin_port = htons(1234),
tools/testing/selftests/bpf/prog_tests/lwt_seg6local.c
151
server_addr.sin6_port = htons(SERVER_PORT);
tools/testing/selftests/bpf/prog_tests/probe_user.c
54
in->sin_port = htons(5555);
tools/testing/selftests/bpf/prog_tests/select_reuseport.c
253
expected.eth_protocol = htons(ETH_P_IPV6);
tools/testing/selftests/bpf/prog_tests/select_reuseport.c
269
expected.eth_protocol = htons(ETH_P_IP);
tools/testing/selftests/bpf/prog_tests/sk_assign.c
153
CHECK(port != htons(CONNECT_PORT), "Expected", "port %u but got %u",
tools/testing/selftests/bpf/prog_tests/sk_assign.c
157
CHECK(port != htons(BIND_PORT), "Expected",
tools/testing/selftests/bpf/prog_tests/sk_assign.c
182
addr4->sin_port = htons(port);
tools/testing/selftests/bpf/prog_tests/sk_assign.c
192
addr6->sin6_port = htons(port);
tools/testing/selftests/bpf/prog_tests/sk_lookup.c
208
ctx->remote_port = htons(remote_port);
tools/testing/selftests/bpf/prog_tests/sock_post_bind.c
325
addr4->sin_port = htons(port);
tools/testing/selftests/bpf/prog_tests/sock_post_bind.c
332
addr6->sin6_port = htons(port);
tools/testing/selftests/bpf/prog_tests/sock_post_bind.c
354
addr4->sin_port = htons(port_retry);
tools/testing/selftests/bpf/prog_tests/sock_post_bind.c
356
addr6->sin6_port = htons(port_retry);
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
39
.sin_port = htons(80),
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
268
localaddr.sin_port = htons(0);
tools/testing/selftests/bpf/prog_tests/test_xsk.c
65
eth_hdr->h_proto = htons(ETH_P_LOOPBACK);
tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
212
.h_proto = htons(ETH_P_IP),
tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
236
iph.tot_len = htons(sizeof(buf) - ETH_HLEN);
tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
177
.h_proto = htons(ETH_P_IP),
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
166
eth->h_proto = htons(ETH_P_IP);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
171
iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + UDP_PAYLOAD_BYTES);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
180
udph->source = htons(UDP_SOURCE_PORT);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
181
udph->dest = htons(dst_port);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
182
udph->len = htons(sizeof(*udph) + UDP_PAYLOAD_BYTES);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
213
rx_addr.sin_port = htons(AF_XDP_CONSUMER_PORT);
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
298
ASSERT_EQ(eth->h_proto, htons(ETH_P_IP), "eth->h_proto");
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
328
ASSERT_EQ(udph->check, htons(0x721c), "csum");
tools/testing/selftests/bpf/prog_tests/xdp_metadata.c
43
#define VLAN_PID htons(ETH_P_8021Q)
tools/testing/selftests/bpf/test_maps.c
689
addr.sin_port = htons(ports[i]);
tools/testing/selftests/bpf/test_maps.c
716
addr.sin_port = htons(ports[i - 2]);
tools/testing/selftests/bpf/test_sockmap.c
347
addr.sin_port = htons(S1_PORT);
tools/testing/selftests/bpf/test_sockmap.c
354
addr.sin_port = htons(S2_PORT);
tools/testing/selftests/bpf/test_sockmap.c
362
addr.sin_port = htons(S1_PORT);
tools/testing/selftests/bpf/test_sockmap.c
369
addr.sin_port = htons(S2_PORT);
tools/testing/selftests/bpf/test_sockmap.c
377
addr.sin_port = htons(S1_PORT);
tools/testing/selftests/bpf/test_sockmap.c
384
addr.sin_port = htons(S2_PORT);
tools/testing/selftests/bpf/xdp_features.c
410
tlv->type = htons(CMD_ACK);
tools/testing/selftests/bpf/xdp_features.c
411
tlv->len = htons(sizeof(*tlv));
tools/testing/selftests/bpf/xdp_features.c
426
tlv->type = htons(CMD_ACK);
tools/testing/selftests/bpf/xdp_features.c
427
tlv->len = htons(sizeof(*tlv));
tools/testing/selftests/bpf/xdp_features.c
444
tlv->type = htons(CMD_ACK);
tools/testing/selftests/bpf/xdp_features.c
446
tlv->len = htons(n);
tools/testing/selftests/bpf/xdp_features.c
469
tlv->type = htons(CMD_ACK);
tools/testing/selftests/bpf/xdp_features.c
471
tlv->len = htons(n);
tools/testing/selftests/bpf/xdp_features.c
536
tlv->type = htons(cmd);
tools/testing/selftests/bpf/xdp_features.c
537
tlv->len = htons(sizeof(*tlv));
tools/testing/selftests/bpf/xdp_features.c
564
tlv->type = htons(CMD_ECHO);
tools/testing/selftests/bpf/xdp_features.c
565
tlv->len = htons(sizeof(*tlv));
tools/testing/selftests/bpf/xdp_hw_metadata.c
382
if (eth->h_proto == htons(ETH_P_IP)) {
tools/testing/selftests/bpf/xdp_hw_metadata.c
385
} else if (eth->h_proto == htons(ETH_P_IPV6)) {
tools/testing/selftests/bpf/xdping.c
221
pinginfo.seq = htons(count);
tools/testing/selftests/cgroup/test_memcontrol.c
1280
saddr.sin6_port = htons(srv_args->port);
tools/testing/selftests/drivers/net/gro.c
1215
rxfd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_NONE));
tools/testing/selftests/drivers/net/gro.c
1427
ethhdr_proto = htons(ETH_P_IP);
tools/testing/selftests/drivers/net/gro.c
1431
ethhdr_proto = htons(ETH_P_IPV6);
tools/testing/selftests/drivers/net/gro.c
1436
ethhdr_proto = htons(ETH_P_IP);
tools/testing/selftests/drivers/net/gro.c
243
ph6.protocol = htons(IPPROTO_TCP);
tools/testing/selftests/drivers/net/gro.c
244
ph6.payload_len = htons(sizeof(struct tcphdr) + payload_len);
tools/testing/selftests/drivers/net/gro.c
252
ph4.protocol = htons(IPPROTO_TCP);
tools/testing/selftests/drivers/net/gro.c
253
ph4.payload_len = htons(sizeof(struct tcphdr) + payload_len);
tools/testing/selftests/drivers/net/gro.c
287
ip6h->payload_len = htons(sizeof(struct tcphdr) + payload_len);
tools/testing/selftests/drivers/net/gro.c
301
iph->tot_len = htons(sizeof(struct tcphdr) +
tools/testing/selftests/drivers/net/gro.c
303
iph->frag_off = htons(0x4000); /* DF = 1, MF = 0 */
tools/testing/selftests/drivers/net/gro.c
319
tcph->source = htons(SPORT);
tools/testing/selftests/drivers/net/gro.c
320
tcph->dest = htons(DPORT);
tools/testing/selftests/drivers/net/gro.c
326
tcph->window = htons(TCP_MAXWIN);
tools/testing/selftests/drivers/net/gro.c
483
iph->tot_len = htons(ntohs(iph->tot_len) + extlen);
tools/testing/selftests/drivers/net/gro.c
489
iph->tot_len = htons(ntohs(iph->tot_len) + extlen);
tools/testing/selftests/drivers/net/gro.c
494
ip6h->payload_len = htons(ntohs(ip6h->payload_len) + extlen);
tools/testing/selftests/drivers/net/gro.c
674
iph->tot_len = htons(ntohs(iph->tot_len) + optlen);
tools/testing/selftests/drivers/net/gro.c
695
iph->payload_len = htons(ntohs(iph->payload_len) + MIN_EXTHDR_SIZE);
tools/testing/selftests/drivers/net/gro.c
725
iph1->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
726
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
728
iph2->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
729
iph2->id = htons(9);
tools/testing/selftests/drivers/net/gro.c
733
iph1->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
734
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
736
iph2->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
737
iph2->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
741
iph1->frag_off &= ~htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
742
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
744
iph2->frag_off &= ~htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
745
iph2->id = htons(9);
tools/testing/selftests/drivers/net/gro.c
749
iph1->frag_off &= ~htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
750
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
752
iph2->frag_off &= ~htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
753
iph2->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
760
iph1->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
761
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
763
iph2->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
764
iph2->id = htons(9);
tools/testing/selftests/drivers/net/gro.c
766
iph3->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
767
iph3->id = htons(9);
tools/testing/selftests/drivers/net/gro.c
775
iph1->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
776
iph1->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
778
iph2->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
779
iph2->id = htons(8);
tools/testing/selftests/drivers/net/gro.c
781
iph3->frag_off |= htons(IP_DF);
tools/testing/selftests/drivers/net/gro.c
782
iph3->id = htons(9);
tools/testing/selftests/drivers/net/gro.c
850
iph->frag_off = htons(0x6000); // DF = 1, MF = 1
tools/testing/selftests/drivers/net/gro.c
938
ip6h->payload_len = htons(ntohs(ip6h->payload_len) + extlen);
tools/testing/selftests/drivers/net/hw/iou-zcrx.c
112
sin6->sin6_port = htons(port);
tools/testing/selftests/drivers/net/hw/iou-zcrx.c
477
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/drivers/net/hw/ncdevmem.c
796
sin6->sin6_port = htons(port);
tools/testing/selftests/drivers/net/hw/toeplitz.c
392
ll.sll_protocol = cfg_family == AF_INET ? htons(ETH_P_IP) :
tools/testing/selftests/drivers/net/hw/toeplitz.c
393
htons(ETH_P_IPV6);
tools/testing/selftests/drivers/net/psp_responder.c
322
addr.sin6_port = htons(opts->port);
tools/testing/selftests/landlock/net_test.c
152
srv->ipv4_addr.sin_port = htons(port);
tools/testing/selftests/landlock/net_test.c
1520
srv_max_allowed.ipv4_addr.sin_port = htons(port_max_bind.port);
tools/testing/selftests/landlock/net_test.c
156
srv->ipv6_addr.sin6_port = htons(port);
tools/testing/selftests/landlock/net_test.c
1593
.port = htons(self->srv0.port),
tools/testing/selftests/landlock/net_test.c
61
srv->ipv4_addr.sin_port = htons(srv->port);
tools/testing/selftests/landlock/net_test.c
67
srv->ipv6_addr.sin6_port = htons(srv->port);
tools/testing/selftests/net/bind_wildcard.c
701
addr4->sin_port = htons(0);
tools/testing/selftests/net/bind_wildcard.c
710
addr6->sin6_port = htons(0);
tools/testing/selftests/net/busy_poller.c
291
server_addr.sin_port = htons(cfg_port);
tools/testing/selftests/net/cmsg_sender.c
515
struct udphdr hdr = { 1, 2, htons(opt.size), 0 };
tools/testing/selftests/net/cmsg_sender.c
519
sin6->sin6_port = htons(opt.sock.proto);
tools/testing/selftests/net/fin_ack_lat.c
56
addr.sin_port = htons(port);
tools/testing/selftests/net/icmp_rfc4884.c
122
addr->v4.sin_port = htons(port);
tools/testing/selftests/net/icmp_rfc4884.c
128
addr->v6.sin6_port = htons(port);
tools/testing/selftests/net/icmp_rfc4884.c
175
objh->length = htons(obj_len);
tools/testing/selftests/net/icmp_rfc4884.c
178
exthdr->checksum = htons(bad_csum ? sum - 1 : sum);
tools/testing/selftests/net/icmp_rfc4884.c
201
iph->tot_len = htons(len);
tools/testing/selftests/net/icmp_rfc4884.c
202
iph->check = htons(csum(iph, sizeof(*iph)));
tools/testing/selftests/net/icmp_rfc4884.c
204
udph->source = htons(src_port);
tools/testing/selftests/net/icmp_rfc4884.c
205
udph->dest = htons(dst_port);
tools/testing/selftests/net/icmp_rfc4884.c
206
udph->len = htons(sizeof(*udph) + payload_len);
tools/testing/selftests/net/icmp_rfc4884.c
228
iph->payload_len = htons(sizeof(*udph) + payload_len);
tools/testing/selftests/net/icmp_rfc4884.c
233
udph->source = htons(src_port);
tools/testing/selftests/net/icmp_rfc4884.c
234
udph->dest = htons(dst_port);
tools/testing/selftests/net/icmp_rfc4884.c
235
udph->len = htons(sizeof(*udph) + payload_len);
tools/testing/selftests/net/icmp_rfc4884.c
275
icmph->checksum = htons(csum(icmph, len));
tools/testing/selftests/net/icmp_rfc4884.c
311
icmph->icmp6_cksum = htons(csum(icmph, len));
tools/testing/selftests/net/io_uring_zerocopy_tx.c
284
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/io_uring_zerocopy_tx.c
292
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/ip_defrag.c
112
return htons(res);
tools/testing/selftests/net/ip_defrag.c
129
return htons(res);
tools/testing/selftests/net/ip_defrag.c
145
udphdr.source = htons(cfg_port + 1);
tools/testing/selftests/net/ip_defrag.c
146
udphdr.dest = htons(cfg_port);
tools/testing/selftests/net/ip_defrag.c
147
udphdr.len = htons(UDP_HLEN + payload_len);
tools/testing/selftests/net/ip_defrag.c
162
fraghdr->ip6f_offlg = htons(offset);
tools/testing/selftests/net/ip_defrag.c
165
fraghdr->ip6f_offlg = htons(offset | IP6_MF);
tools/testing/selftests/net/ip_defrag.c
167
ip6hdr->ip6_plen = htons(frag_len);
tools/testing/selftests/net/ip_defrag.c
180
iphdr->ip_off = htons(offset / 8);
tools/testing/selftests/net/ip_defrag.c
183
iphdr->ip_off = htons(offset / 8 | IP4_MF);
tools/testing/selftests/net/ip_defrag.c
185
iphdr->ip_len = htons(frag_len);
tools/testing/selftests/net/ip_defrag.c
236
iphdr->ip_id = htons(ip_id++);
tools/testing/selftests/net/ip_defrag.c
307
fraghdr->ip6f_offlg = htons(offset / 8 | IP6_MF);
tools/testing/selftests/net/ip_defrag.c
308
ip6hdr->ip6_plen = htons(frag_len);
tools/testing/selftests/net/ip_defrag.c
312
iphdr->ip_off = htons(offset / 8 | IP4_MF);
tools/testing/selftests/net/ip_defrag.c
313
iphdr->ip_len = htons(frag_len);
tools/testing/selftests/net/ip_defrag.c
414
addr.sin_port = htons(cfg_port);
tools/testing/selftests/net/ip_defrag.c
425
addr.sin6_port = htons(cfg_port);
tools/testing/selftests/net/ip_local_port_range.c
389
addr.v4.sin_port = htons(0);
tools/testing/selftests/net/ip_local_port_range.c
395
addr.v6.sin6_port = htons(0);
tools/testing/selftests/net/ip_local_port_range.c
60
addr.v4.sin_port = htons(0);
tools/testing/selftests/net/ip_local_port_range.c
66
addr.v6.sin6_port = htons(0);
tools/testing/selftests/net/ipsec.c
682
server.sin_port = htons(port);
tools/testing/selftests/net/ipsec.c
719
server.sin_port = htons(port);
tools/testing/selftests/net/ipv6_flowlabel.c
219
addr.sin6_port = htons(8000);
tools/testing/selftests/net/ipv6_fragmentation.c
81
.sin6_port = htons(9) /* port 9/udp (DISCARD) */
tools/testing/selftests/net/lib/csum.c
177
sum += htons(proto);
tools/testing/selftests/net/lib/csum.c
178
sum += htons(len);
tools/testing/selftests/net/lib/csum.c
199
iph->tot_len = htons(sizeof(*iph) + len);
tools/testing/selftests/net/lib/csum.c
214
ip6h->payload_len = htons(len);
tools/testing/selftests/net/lib/csum.c
229
uh->source = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
230
uh->dest = htons(cfg_port_dst);
tools/testing/selftests/net/lib/csum.c
231
uh->len = htons(sizeof(*uh) + cfg_payload_len);
tools/testing/selftests/net/lib/csum.c
260
th->source = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
261
th->dest = htons(cfg_port_dst);
tools/testing/selftests/net/lib/csum.c
282
uh->dest = htons(cfg_port_dst);
tools/testing/selftests/net/lib/csum.c
283
uh->source = htons(cfg_port_src_encap);
tools/testing/selftests/net/lib/csum.c
285
uh->len = htons(sizeof(*uh) +
tools/testing/selftests/net/lib/csum.c
355
cfg_saddr6.sin6_port = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
363
cfg_saddr4.sin_port = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
424
addr.sll_protocol = htons(ETH_P_IPV6);
tools/testing/selftests/net/lib/csum.c
427
addr.sll_protocol = htons(ETH_P_IP);
tools/testing/selftests/net/lib/csum.c
534
laddr.sll_protocol = htons(ETH_P_IP);
tools/testing/selftests/net/lib/csum.c
536
laddr.sll_protocol = htons(ETH_P_IPV6);
tools/testing/selftests/net/lib/csum.c
620
if (len < sizeof(*tcph) || tcph->dest != htons(cfg_port_dst))
tools/testing/selftests/net/lib/csum.c
643
if (udph->dest != htons(cfg_port_dst))
tools/testing/selftests/net/lib/csum.c
646
if (udph->source == htons(cfg_port_src_encap))
tools/testing/selftests/net/lib/csum.c
891
cfg_saddr6.sin6_port = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
892
cfg_daddr6.sin6_port = htons(cfg_port_dst);
tools/testing/selftests/net/lib/csum.c
899
cfg_saddr4.sin_port = htons(cfg_port_src);
tools/testing/selftests/net/lib/csum.c
900
cfg_daddr4.sin_port = htons(cfg_port_dst);
tools/testing/selftests/net/mptcp/mptcp_diag.c
390
r.id.idiag_sport = htons(sport);
tools/testing/selftests/net/mptcp/mptcp_diag.c
391
r.id.idiag_dport = htons(dport);
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1322
a4->sin_port = htons(atoi(argv[3]));
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1326
a6->sin6_port = htons(atoi(argv[3]));
tools/testing/selftests/net/msg_zerocopy.c
274
iph->tot_len = htons(sizeof(*iph) + payload_len);
tools/testing/selftests/net/msg_zerocopy.c
288
ip6h->payload_len = htons(payload_len);
tools/testing/selftests/net/msg_zerocopy.c
308
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/msg_zerocopy.c
316
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/msg_zerocopy.c
510
eth.h_proto = htons(proto);
tools/testing/selftests/net/msg_zerocopy.c
520
laddr.sll_protocol = htons(proto);
tools/testing/selftests/net/netfilter/connect_close.c
76
.sin_port = htons(opts.port),
tools/testing/selftests/net/netfilter/connect_close.c
93
.sin_port = htons(opts.port),
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
117
mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
240
mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
287
mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
41
mnl_attr_put_u16(nlh, CTA_PROTO_SRC_PORT, htons(src_port));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
42
mnl_attr_put_u16(nlh, CTA_PROTO_DST_PORT, htons(dst_port));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
71
mnl_attr_put_u16(nlh, CTA_PROTO_SRC_PORT, htons(src_port));
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
72
mnl_attr_put_u16(nlh, CTA_PROTO_DST_PORT, htons(dst_port));
tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
107
if (peer.sin_port != htons(PORT))
tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
116
if (peer.sin_port != htons((PORT + 1)))
tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
75
sa1.sin_port = htons(PORT);
tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
76
sa2.sin_port = htons(PORT + 1);
tools/testing/selftests/net/netfilter/nf_queue.c
127
.pf = htons(AF_INET),
tools/testing/selftests/net/netfilter/nf_queue.c
138
nfg->res_id = htons(queue_num);
tools/testing/selftests/net/netfilter/nf_queue.c
161
nfg->res_id = htons(queue_num);
tools/testing/selftests/net/netfilter/nf_queue.c
184
nfg->res_id = htons(queue_num);
tools/testing/selftests/net/netfilter/sctp_collision.c
31
saddr.sin_port = htons(atoi(argv[3]));
tools/testing/selftests/net/netfilter/sctp_collision.c
47
daddr.sin_port = htons(atoi(argv[5]));
tools/testing/selftests/net/netfilter/udpclash.c
139
si_remote.sin_port = htons(atoi(argv[2]));
tools/testing/selftests/net/nettest.c
1341
.sin_port = htons(args->port),
tools/testing/selftests/net/nettest.c
1426
serv_addr.sin_port = htons(args->port);
tools/testing/selftests/net/nettest.c
1433
serv6_addr.sin6_port = htons(args->port);
tools/testing/selftests/net/nettest.c
1805
sin.sin_port = htons(args->port);
tools/testing/selftests/net/nettest.c
1814
sin6.sin6_port = htons(args->port);
tools/testing/selftests/net/nettest.c
319
sin.sin_port = htons(args->port);
tools/testing/selftests/net/nettest.c
325
sin6.sin6_port = htons(args->port);
tools/testing/selftests/net/ovpn/ovpn-cli.c
1839
uint16_t len = htons(1000);
tools/testing/selftests/net/ovpn/ovpn-cli.c
494
in->sin_port = htons(ctx->lport);
tools/testing/selftests/net/ovpn/ovpn-cli.c
501
in6->sin6_port = htons(ctx->lport);
tools/testing/selftests/net/psock_fanout.c
107
addr.sll_protocol = htons(ETH_P_IP);
tools/testing/selftests/net/psock_lib.h
86
saddr.sin_port = htons(port);
tools/testing/selftests/net/psock_lib.h
91
daddr.sin_port = htons(port + 1);
tools/testing/selftests/net/psock_snd.c
108
eth->h_proto = htons(ETH_P_8021Q);
tools/testing/selftests/net/psock_snd.c
109
tag[1] = htons(ETH_P_IP);
tools/testing/selftests/net/psock_snd.c
113
eth->h_proto = htons(ETH_P_IP);
tools/testing/selftests/net/psock_snd.c
124
iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len);
tools/testing/selftests/net/psock_snd.c
125
iph->id = htons(1337);
tools/testing/selftests/net/psock_snd.c
140
udph->source = htons(9);
tools/testing/selftests/net/psock_snd.c
141
udph->dest = htons(cfg_port);
tools/testing/selftests/net/psock_snd.c
142
udph->len = htons(len);
tools/testing/selftests/net/psock_snd.c
146
htons(IPPROTO_UDP) + udph->len);
tools/testing/selftests/net/psock_snd.c
175
laddr.sll_protocol = htons(ETH_P_IP);
tools/testing/selftests/net/psock_snd.c
202
laddr.sll_protocol = htons(ETH_P_IP);
tools/testing/selftests/net/psock_snd.c
265
raddr.sin_port = htons(cfg_port);
tools/testing/selftests/net/psock_tpacket.c
134
if (eth->h_proto != htons(ETH_P_IP)) {
tools/testing/selftests/net/psock_tpacket.c
154
eth->h_proto = htons(ETH_P_IP);
tools/testing/selftests/net/psock_tpacket.c
164
ip->tot_len = htons((uint16_t) *len - sizeof(*eth));
tools/testing/selftests/net/psock_tpacket.c
395
rcv_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
tools/testing/selftests/net/psock_tpacket.c
733
ring->ll.sll_protocol = htons(ETH_P_ALL);
tools/testing/selftests/net/reuseaddr_conflict.c
33
.sin6_port = htons(PORT),
tools/testing/selftests/net/reuseaddr_conflict.c
38
.sin_port = htons(PORT),
tools/testing/selftests/net/reuseport_addr_any.c
105
daddr4.sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_addr_any.c
118
daddr6.sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_addr_any.c
46
addr4.sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_addr_any.c
56
addr6.sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf.c
57
addr4->sin_port = htons(port);
tools/testing/selftests/net/reuseport_bpf.c
63
addr6->sin6_port = htons(port);
tools/testing/selftests/net/reuseport_bpf_cpu.c
112
daddr4->sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_cpu.c
123
daddr6->sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_cpu.c
47
addr4->sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_cpu.c
53
addr6->sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_numa.c
124
daddr4->sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_numa.c
135
daddr6->sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_numa.c
43
addr4->sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_bpf_numa.c
49
addr6->sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_dualstack.c
43
addr4->sin_port = htons(PORT);
tools/testing/selftests/net/reuseport_dualstack.c
49
addr6->sin6_port = htons(PORT);
tools/testing/selftests/net/reuseport_dualstack.c
84
daddr.sin_port = htons(PORT);
tools/testing/selftests/net/rxtimestamp.c
313
addr.addr4.sin_port = htons(port);
tools/testing/selftests/net/rxtimestamp.c
320
addr.addr6.sin6_port = htons(port);
tools/testing/selftests/net/sctp_hello.c
17
a->sin_port = htons(atoi(port));
tools/testing/selftests/net/sctp_hello.c
24
a->sin6_port = htons(atoi(port));
tools/testing/selftests/net/sk_bind_sendto_listen.c
13
.sin6_port = htons(20000),
tools/testing/selftests/net/sk_connect_zero_addr.c
13
.sin6_port = htons(20000),
tools/testing/selftests/net/skf_net_off.c
129
pi.proto = htons(ETH_P_IPV6);
tools/testing/selftests/net/skf_net_off.c
133
eth.h_proto = htons(ETH_P_IPV6);
tools/testing/selftests/net/skf_net_off.c
136
ip6h.payload_len = htons(sizeof(uh) + sizeof(uint32_t));
tools/testing/selftests/net/skf_net_off.c
144
uh.source = htons(8000);
tools/testing/selftests/net/skf_net_off.c
145
uh.dest = htons(cfg_dst_port);
tools/testing/selftests/net/so_incoming_cpu.c
101
self->in_addr.sin_port = htons(0);
tools/testing/selftests/net/so_rcv_listener.c
101
recv_addr4.sin_port = htons(atoi(opt.service));
tools/testing/selftests/net/so_rcv_listener.c
113
recv_addr6.sin6_port = htons(atoi(opt.service));
tools/testing/selftests/net/so_txtime.c
375
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/so_txtime.c
383
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/stress_reuseport_listen.c
33
sa6.sin6_port = htons(IP6_LPORT);
tools/testing/selftests/net/tap.c
219
eth->h_proto = htons(proto);
tools/testing/selftests/net/tap.c
266
htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len);
tools/testing/selftests/net/tap.c
267
iph->id = htons(1337);
tools/testing/selftests/net/tap.c
283
udph->source = htons(22);
tools/testing/selftests/net/tap.c
284
udph->dest = htons(58822);
tools/testing/selftests/net/tap.c
285
udph->len = htons(len);
tools/testing/selftests/net/tap.c
290
sum += htons(IPPROTO_UDP) + udph->len;
tools/testing/selftests/net/tcp_ao/icmps-accept.c
171
iph->tot_len = htons(packet_len);
tools/testing/selftests/net/tcp_ao/icmps-accept.c
233
iph->payload_len = htons(packet_len);
tools/testing/selftests/net/tcp_ao/icmps-accept.c
333
dst_raw.sin6_port = htons(IPPROTO_RAW);
tools/testing/selftests/net/tcp_ao/icmps-discard.c
171
iph->tot_len = htons(packet_len);
tools/testing/selftests/net/tcp_ao/icmps-discard.c
233
iph->payload_len = htons(packet_len);
tools/testing/selftests/net/tcp_ao/icmps-discard.c
333
dst_raw.sin6_port = htons(IPPROTO_RAW);
tools/testing/selftests/net/tcp_ao/lib/aolib.h
300
tcp_addr_to_sockaddr_in(&addr, &taddr, htons(port));
tools/testing/selftests/net/tcp_ao/lib/aolib.h
345
tcp_addr_to_sockaddr_in(&addr, &taddr, htons(port));
tools/testing/selftests/net/tcp_ao/lib/aolib.h
605
tcp_addr_to_sockaddr_in(&addr, &taddr, htons(port));
tools/testing/selftests/net/tcp_ao/lib/aolib.h
692
tcp_addr_to_sockaddr_in(&addr, &daddr, htons(dport));
tools/testing/selftests/net/tcp_ao/self-connect.c
114
addr.sin6_port = htons(port + 1);
tools/testing/selftests/net/tcp_ao/self-connect.c
116
addr.sin_port = htons(port + 1);
tools/testing/selftests/net/tcp_ao/self-connect.c
45
tcp_addr_to_sockaddr_in(&addr, &local_addr, htons(port));
tools/testing/selftests/net/tcp_ao/seq-ext.c
110
saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1);
tools/testing/selftests/net/tcp_ao/seq-ext.c
112
saddr.sin_port = htons(ntohs(saddr.sin_port) + 1);
tools/testing/selftests/net/tcp_ao/seq-ext.c
208
saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1);
tools/testing/selftests/net/tcp_ao/seq-ext.c
211
saddr.sin_port = htons(ntohs(saddr.sin_port) + 1);
tools/testing/selftests/net/tcp_ao/setsockopt-closed.c
16
tcp_addr_to_sockaddr_in(&addr, &this_ip_addr, htons(test_port++));
tools/testing/selftests/net/tcp_fastopen_backup_key.c
102
addr4.sin_port = htons(PORT);
tools/testing/selftests/net/tcp_fastopen_backup_key.c
109
addr6.sin6_port = htons(PORT);
tools/testing/selftests/net/tcp_fastopen_backup_key.c
160
daddr4.sin_port = htons(PORT);
tools/testing/selftests/net/tcp_fastopen_backup_key.c
173
daddr6.sin6_port = htons(PORT);
tools/testing/selftests/net/tcp_inq.c
46
addr4->sin_port = htons(port);
tools/testing/selftests/net/tcp_inq.c
52
addr6->sin6_port = htons(port);
tools/testing/selftests/net/tcp_mmap.c
347
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/tcp_mmap.c
355
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/tcp_port_share.c
68
addr->v4.sin_port = htons(port);
tools/testing/selftests/net/tcp_port_share.c
75
addr->v6.sin6_port = htons(port);
tools/testing/selftests/net/tfo.c
158
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/tfo.c
27
sin6->sin6_port = htons(port);
tools/testing/selftests/net/timestamping.c
419
addr.sin_port = htons(319 /* PTP event port */);
tools/testing/selftests/net/tun.c
282
geneve.vnport = htons(VN_PORT);
tools/testing/selftests/net/tun.c
710
s4->sin_port = htons(UDP_SRC_PORT);
tools/testing/selftests/net/tun.c
711
d4->sin_port = htons(UDP_DST_PORT);
tools/testing/selftests/net/tun.c
722
s6->sin6_port = htons(UDP_SRC_PORT);
tools/testing/selftests/net/tun.c
723
d6->sin6_port = htons(UDP_DST_PORT);
tools/testing/selftests/net/tuntap_helpers.h
223
eth->h_proto = htons(proto);
tools/testing/selftests/net/tuntap_helpers.h
268
iph->tot_len = htons(sizeof(*iph) + payload_len);
tools/testing/selftests/net/tuntap_helpers.h
269
iph->id = htons(TUNTAP_DEFAULT_IPID);
tools/testing/selftests/net/tuntap_helpers.h
285
*ptr = htons(val);
tools/testing/selftests/net/tuntap_helpers.h
295
ip6h->payload_len = htons(payload_len);
tools/testing/selftests/net/tuntap_helpers.h
307
uint16_t protocol = htons(ETH_P_TEB);
tools/testing/selftests/net/tuntap_helpers.h
320
udph->source = htons(sport);
tools/testing/selftests/net/tuntap_helpers.h
321
udph->dest = htons(dport);
tools/testing/selftests/net/tuntap_helpers.h
322
udph->len = htons(sizeof(*udph) + payload_len);
tools/testing/selftests/net/tuntap_helpers.h
335
sum += htons(IPPROTO_UDP) + udph->len;
tools/testing/selftests/net/txring_overwrite.c
51
eth->h_proto = htons(ETH_P_IP);
tools/testing/selftests/net/txring_overwrite.c
61
iph->tot_len = htons(blen - off);
tools/testing/selftests/net/txring_overwrite.c
66
udph->dest = htons(8000);
tools/testing/selftests/net/txring_overwrite.c
67
udph->source = htons(8001);
tools/testing/selftests/net/txring_overwrite.c
68
udph->len = htons(blen - off);
tools/testing/selftests/net/txring_overwrite.c
79
fdr = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP));
tools/testing/selftests/net/txring_overwrite.c
97
laddr.sll_protocol = htons(0);
tools/testing/selftests/net/txtimestamp.c
426
pseudo_sum = htons(IPPROTO_UDP);
tools/testing/selftests/net/txtimestamp.c
461
ip6h->payload_len = htons(sizeof(struct udphdr) + cfg_payload_len);
tools/testing/selftests/net/txtimestamp.c
514
daddr6.sin6_port = htons(cfg_ipproto);
tools/testing/selftests/net/txtimestamp.c
609
laddr.sll_protocol = htons(family == AF_INET ? ETH_P_IP : ETH_P_IPV6);
tools/testing/selftests/net/txtimestamp.c
849
daddr.sin_port = htons(dest_port);
tools/testing/selftests/net/txtimestamp.c
854
daddr6.sin6_port = htons(dest_port);
tools/testing/selftests/net/udpgso.c
561
addr.sin_port = htons(cfg_port);
tools/testing/selftests/net/udpgso.c
572
addr.sin6_port = htons(cfg_port);
tools/testing/selftests/net/udpgso_bench_rx.c
69
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/udpgso_bench_rx.c
75
addr6->sin6_port = htons(cfg_port);
tools/testing/selftests/net/udpgso_bench_tx.c
124
addr4->sin_port = htons(cfg_port);
tools/testing/selftests/net/udpgso_bench_tx.c
130
addr6->sin6_port = htons(cfg_port);
tools/usb/usbip/src/usbip_network.c
70
i = htons(num);
tools/virtio/vhost_net_test.c
106
dev->sock = socket(AF_PACKET, SOCK_RAW, htons(TEST_PTYPE));
tools/virtio/vhost_net_test.c
130
saddrll.sll_protocol = htons(TEST_PTYPE);
tools/virtio/vhost_net_test.c
225
eh->ether_type = htons(TEST_PTYPE);
tools/virtio/vhost_net_test.c
387
if (eh->ether_type == htons(TEST_PTYPE)) {