/linux-master/net/netfilter/ |
H A D | nf_nat_helper.c | 59 ip_hdr(skb)->tot_len = htons(skb->len); 63 htons(skb->len - sizeof(struct ipv6hdr)); 164 udph->len = htons(datalen); 218 exp->tuple.dst.u.tcp.port = htons(port);
|
/linux-master/drivers/net/ethernet/qualcomm/rmnet/ |
H A D | rmnet_handlers.c | 26 skb->protocol = htons(ETH_P_IP); 29 skb->protocol = htons(ETH_P_IPV6); 32 skb->protocol = htons(ETH_P_MAP); 178 skb->protocol = htons(ETH_P_MAP);
|
/linux-master/arch/x86/lib/ |
H A D | csum-wrappers_64.c | 77 rest = (__force __u64)htonl(len) + (__force __u64)htons(proto) +
|
/linux-master/include/net/ |
H A D | udplite.h | 79 udp_hdr(skb)->len = htons(pcslen);
|
H A D | ip_tunnels.h | 350 case htons(ETH_P_IPV6): 354 case htons(ETH_P_IP): 379 case htons(ETH_P_IPV6): 383 case htons(ETH_P_IP): 445 if (payload_protocol == htons(ETH_P_IP)) 447 else if (payload_protocol == htons(ETH_P_IPV6)) 458 if (payload_protocol == htons(ETH_P_IPV6)) 469 if (payload_protocol == htons(ETH_P_IP)) 471 else if (payload_protocol == htons(ETH_P_IPV6))
|
/linux-master/net/ipv6/ |
H A D | tcp_ao.c | 44 tmp->outlen = htons(tcp_ao_digest_size(mkt) * 8); /* in bits */ 70 &sk->sk_v6_daddr, htons(sk->sk_num), 75 htons(sk->sk_num), disn, sisn); 85 htons(ireq->ir_num), ireq->ir_rmt_port,
|
H A D | xfrm6_input.c | 57 ipv6_hdr(skb)->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); 137 ip6h->payload_len = htons(ntohs(ip6h->payload_len) - len); 169 if (skb->protocol == htons(ETH_P_IP)) 193 if (skb->protocol == htons(ETH_P_IP))
|
/linux-master/tools/testing/selftests/net/tcp_ao/ |
H A D | seq-ext.c | 110 saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1); 112 saddr.sin_port = htons(ntohs(saddr.sin_port) + 1); 199 saddr.sin6_port = htons(ntohs(saddr.sin6_port) + 1); 202 saddr.sin_port = htons(ntohs(saddr.sin_port) + 1);
|
/linux-master/tools/testing/selftests/net/ |
H A D | tap.c | 225 eth->h_proto = htons(proto); 272 htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); 273 iph->id = htons(1337); 289 udph->source = htons(22); 290 udph->dest = htons(58822); 291 udph->len = htons(len); 296 sum += htons(IPPROTO_UDP) + udph->len;
|
H A D | gro.c | 208 ph6.protocol = htons(IPPROTO_TCP); 209 ph6.payload_len = htons(sizeof(struct tcphdr) + payload_len); 217 ph4.protocol = htons(IPPROTO_TCP); 218 ph4.payload_len = htons(sizeof(struct tcphdr) + payload_len); 252 ip6h->payload_len = htons(sizeof(struct tcphdr) + payload_len); 266 iph->tot_len = htons(sizeof(struct tcphdr) + 268 iph->frag_off = htons(0x4000); /* DF = 1, MF = 0 */ 284 tcph->source = htons(SPORT); 285 tcph->dest = htons(DPORT); 291 tcph->window = htons(TCP_MAXWI [all...] |
/linux-master/include/linux/ |
H A D | if_vlan.h | 318 case htons(ETH_P_8021Q): 319 case htons(ETH_P_8021AD): 329 if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX) 331 if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX) 381 veth->h_vlan_TCI = htons(vlan_tci); 697 skb->protocol = htons(ETH_P_802_3); 702 skb->protocol = htons(ETH_P_802_2);
|
/linux-master/tools/testing/selftests/netfilter/ |
H A D | conntrack_dump_flush.c | 41 mnl_attr_put_u16(nlh, CTA_PROTO_SRC_PORT, htons(src_port)); 42 mnl_attr_put_u16(nlh, CTA_PROTO_DST_PORT, htons(dst_port)); 69 mnl_attr_put_u16(nlh, CTA_PROTO_SRC_PORT, htons(src_port)); 70 mnl_attr_put_u16(nlh, CTA_PROTO_DST_PORT, htons(dst_port)); 111 mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone)); 233 mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone)); 280 mnl_attr_put_u16(nlh, CTA_ZONE, htons(zone));
|
/linux-master/net/ipv6/netfilter/ |
H A D | nf_reject_ipv6.c | 31 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) 88 nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr)); 135 nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr)); 215 nskb->protocol = htons(ETH_P_IPV6); 367 nskb->protocol = htons(ETH_P_IPV6); 368 ip6h->payload_len = htons(sizeof(struct tcphdr)); 394 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0)
|
/linux-master/tools/testing/selftests/bpf/ |
H A D | test_flow_dissector.c | 175 iph->tot_len = htons(sizeof(*iph) + payload_len); 176 iph->id = htons(1337); 190 *ptr = htons(val); 201 ip6h->payload_len = htons(payload_len); 218 pseudo_sum += htons(IPPROTO_UDP); 231 pseudo_sum += htons(ip6h->nexthdr); 242 udph->source = htons(cfg_src_port); 243 udph->dest = htons(dport); 244 udph->len = htons(len); 265 greh->protocol = htons(prot [all...] |
/linux-master/net/batman-adv/ |
H A D | multicast_forw.c | 287 case htons(ETH_P_IP): 292 case htons(ETH_P_IPV6): 333 case htons(ETH_P_IP): 338 case htons(ETH_P_IPV6): 555 mcast_tracker->num_dests = htons(num_dests); 563 tvlv_hdr->len = htons(tvlv_value_len); 630 mcast_packet->tvlv_len = htons(tvlv_len); 846 mcast_tracker->num_dests = htons(num_dests); 851 tvlv_hdr->len = htons(ntohs(tvlv_hdr->len) - offset); 855 mcast_packet->tvlv_len = htons(ntoh [all...] |
H A D | gateway_client.c | 584 if (proto == htons(ETH_P_8021Q)) { 595 case htons(ETH_P_IP): 607 case htons(ETH_P_IPV6): 631 case htons(ETH_P_IP): 632 if (udphdr->dest == htons(67)) 634 else if (udphdr->source == htons(67)) 637 case htons(ETH_P_IPV6): 638 if (udphdr->dest == htons(547)) 640 else if (udphdr->source == htons(547))
|
/linux-master/drivers/scsi/qedf/ |
H A D | qedf_fip.c | 38 vlan->eth.h_proto = htons(ETH_P_FIP); 41 vlan->fip.fip_op = htons(FIP_OP_VLAN); 43 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); 54 skb->protocol = htons(ETH_P_FIP); 145 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), qedf->vlan_id);
|
/linux-master/drivers/infiniband/sw/rxe/ |
H A D | rxe_recv.c | 111 if (skb->protocol == htons(ETH_P_IP)) { 121 } else if (skb->protocol == htons(ETH_P_IPV6)) { 199 if (skb->protocol == htons(ETH_P_IP)) 202 else if (skb->protocol == htons(ETH_P_IPV6)) 294 if (skb->protocol == htons(ETH_P_IP)) {
|
/linux-master/drivers/i2c/busses/ |
H A D | i2c-cp2615.c | 88 ret->preamble = htons(0x2A2AU); 89 ret->length = htons(data_len + 6); 90 ret->msg = htons(msg); 158 if (msg->msg != htons(iop_I2cTransferResult) || i2c_r->tag != tag) { 192 if (msg->msg != htons(iop_AccessoryInfo)) {
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | xdp_metadata.c | 43 #define VLAN_PID htons(ETH_P_8021Q) 182 eth->h_proto = htons(ETH_P_IP); 187 iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + UDP_PAYLOAD_BYTES); 196 udph->source = htons(UDP_SOURCE_PORT); 197 udph->dest = htons(dst_port); 198 udph->len = htons(sizeof(*udph) + UDP_PAYLOAD_BYTES); 229 rx_addr.sin_port = htons(AF_XDP_CONSUMER_PORT); 314 ASSERT_EQ(eth->h_proto, htons(ETH_P_IP), "eth->h_proto"); 344 ASSERT_EQ(udph->check, htons(0x721c), "csum");
|
/linux-master/net/ipv4/ |
H A D | ip_gre.c | 146 if (tpi->proto == htons(ETH_P_TEB)) 148 else if (tpi->proto == htons(ETH_P_ERSPAN) || 149 tpi->proto == htons(ETH_P_ERSPAN2)) 192 if (tpi->proto == htons(ETH_P_IPV6) && 235 if (gre_parse_header(skb, &tpi, NULL, htons(ETH_P_IP), 306 htons(ETH_P_TEB), 411 if (tpi->proto == htons(ETH_P_TEB)) 417 if (res == PACKET_NEXT && tpi->proto == htons(ETH_P_TEB)) { 441 hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IP), 0); 445 if (unlikely(tpi.proto == htons(ETH_P_ERSPA [all...] |
/linux-master/drivers/net/ethernet/qlogic/qede/ |
H A D | qede_filter.c | 369 if (skb->protocol == htons(ETH_P_IP)) { 445 if (skb->protocol != htons(ETH_P_IP) && 446 skb->protocol != htons(ETH_P_IPV6)) 449 if (skb->protocol == htons(ETH_P_IP)) { 502 if (skb->protocol == htons(ETH_P_IP)) { 1342 if (fltr->tuple.eth_proto == htons(ETH_P_IP)) { 1403 if (t->eth_proto == htons(ETH_P_IP)) 1419 if (a->eth_proto != htons(ETH_P_IP) || 1420 b->eth_proto != htons(ETH_P_IP)) 1461 if (a->eth_proto != htons(ETH_P_IPV [all...] |
/linux-master/drivers/net/ |
H A D | bareudp.c | 75 if (skb->protocol == htons(ETH_P_IP)) 80 if (bareudp->ethertype == htons(ETH_P_IP)) { 91 proto = htons(ETH_P_IP); 93 proto = htons(ETH_P_IPV6); 98 } else if (bareudp->ethertype == htons(ETH_P_MPLS_UC)) { 107 proto = htons(ETH_P_MPLS_MC); 123 proto = htons(ETH_P_MPLS_MC); 319 df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0; 421 if (bareudp->ethertype == htons(ETH_P_MPLS_UC) && 422 proto == htons(ETH_P_MPLS_M [all...] |
/linux-master/net/ethernet/ |
H A D | eth.c | 20 * Alan Cox : eth_header ntohs should be htons 21 * Alan Cox : eth_rebuild_header missing an htons and 86 eth->h_proto = htons(type); 88 eth->h_proto = htons(len); 176 return htons(ETH_P_XDSA); 189 return htons(ETH_P_802_3); 194 return htons(ETH_P_802_2); 227 if (type == htons(ETH_P_802_3))
|
/linux-master/drivers/net/ethernet/intel/iavf/ |
H A D | iavf_fdir.c | 41 if (fltr->eth_mask.etype && fltr->eth_mask.etype != htons(U16_MAX)) 75 if (fltr->ip_mask.src_port && fltr->ip_mask.src_port != htons(U16_MAX)) 78 if (fltr->ip_mask.dst_port && fltr->ip_mask.dst_port != htons(U16_MAX)) 148 pay_word[hdr_offs >> 1] = htons(fltr->flex_words[i].word); 403 if (fltr->ip_mask.src_port == htons(U16_MAX)) { 408 if (fltr->ip_mask.dst_port == htons(U16_MAX)) { 432 if (fltr->ip_mask.src_port == htons(U16_MAX)) { 437 if (fltr->ip_mask.dst_port == htons(U16_MAX)) { 464 if (fltr->ip_mask.src_port == htons(U16_MAX)) { 469 if (fltr->ip_mask.dst_port == htons(U16_MA [all...] |