/linux-4.4.14/include/linux/ |
D | if_vlan.h | 277 if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX) in vlan_hw_offload_capable() 279 if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX) in vlan_hw_offload_capable() 313 veth->h_vlan_TCI = htons(vlan_tci); in __vlan_insert_tag() 427 if (veth->h_vlan_proto != htons(ETH_P_8021Q) && in __vlan_get_tag() 428 veth->h_vlan_proto != htons(ETH_P_8021AD)) in __vlan_get_tag() 490 if (type == htons(ETH_P_8021Q) || type == htons(ETH_P_8021AD)) { in __vlan_get_protocol() 508 } while (type == htons(ETH_P_8021Q) || in __vlan_get_protocol() 509 type == htons(ETH_P_8021AD)); in __vlan_get_protocol() 556 skb->protocol = htons(ETH_P_802_3); in vlan_set_encap_proto() 561 skb->protocol = htons(ETH_P_802_2); in vlan_set_encap_proto() [all …]
|
D | etherdevice.h | 205 proto &= htons(0xFF00); in eth_proto_is_802_3() 208 return (__force u16)proto >= (__force u16)htons(ETH_P_802_3_MIN); in eth_proto_is_802_3()
|
D | hdlc.h | 117 return htons(ETH_P_HDLC); in hdlc_type_trans()
|
/linux-4.4.14/net/8021q/ |
D | vlan_mvrp.c | 31 .pkttype.type = htons(ETH_P_MVRP), 39 __be16 vlan_id = htons(vlan->vlan_id); in vlan_mvrp_request_join() 41 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_mvrp_request_join() 50 __be16 vlan_id = htons(vlan->vlan_id); in vlan_mvrp_request_leave() 52 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_mvrp_request_leave()
|
D | vlan_gvrp.c | 33 __be16 vlan_id = htons(vlan->vlan_id); in vlan_gvrp_request_join() 35 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_gvrp_request_join() 44 __be16 vlan_id = htons(vlan->vlan_id); in vlan_gvrp_request_leave() 46 if (vlan->vlan_proto != htons(ETH_P_8021Q)) in vlan_gvrp_request_leave()
|
D | vlan_netlink.c | 59 case htons(ETH_P_8021Q): in vlan_validate() 60 case htons(ETH_P_8021AD): in vlan_validate() 136 proto = htons(ETH_P_8021Q); in vlan_newlink()
|
D | vlan.h | 41 case htons(ETH_P_8021Q): in vlan_proto_idx() 43 case htons(ETH_P_8021AD): in vlan_proto_idx()
|
D | vlan.c | 223 err = vlan_check_real_dev(real_dev, htons(ETH_P_8021Q), vlan_id); in register_vlan_device() 267 vlan->vlan_proto = htons(ETH_P_8021Q); in register_vlan_device() 371 vlan_vid_add(dev, htons(ETH_P_8021Q), 0); in vlan_device_event() 421 vlan_vid_del(dev, htons(ETH_P_8021Q), 0); in vlan_device_event()
|
D | vlan_core.c | 164 if (vid_info->proto == htons(ETH_P_8021Q) && in vlan_hw_filter_capable() 167 if (vid_info->proto == htons(ETH_P_8021AD) && in vlan_hw_filter_capable()
|
/linux-4.4.14/net/bridge/ |
D | br_netfilter_hooks.c | 65 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) 68 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) 71 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) 77 else if (skb->protocol == htons(ETH_P_8021Q)) in vlan_proto() 84 (vlan_proto(skb) == htons(ETH_P_IP) && \ 88 (vlan_proto(skb) == htons(ETH_P_IPV6) && \ 92 (vlan_proto(skb) == htons(ETH_P_ARP) && \ 102 (skb->protocol == htons(ETH_P_PPP_SES) && \ 103 pppoe_proto(skb) == htons(PPP_IP) && \ 107 (skb->protocol == htons(ETH_P_PPP_SES) && \ [all …]
|
D | br_multicast.c | 61 case htons(ETH_P_IP): in br_ip_equal() 64 case htons(ETH_P_IPV6): in br_ip_equal() 91 case htons(ETH_P_IP): in br_ip_hash() 94 case htons(ETH_P_IPV6): in br_ip_hash() 129 br_dst.proto = htons(ETH_P_IP); in br_mdb_ip4_get() 143 br_dst.proto = htons(ETH_P_IPV6); in br_mdb_ip6_get() 166 case htons(ETH_P_IP): in br_mdb_get() 170 case htons(ETH_P_IPV6): in br_mdb_get() 376 skb->protocol = htons(ETH_P_IP); in br_ip4_multicast_alloc_query() 388 eth->h_proto = htons(ETH_P_IP); in br_ip4_multicast_alloc_query() [all …]
|
D | br_mdb.c | 89 if (p->addr.proto == htons(ETH_P_IP)) in br_mdb_fill_info() 92 if (p->addr.proto == htons(ETH_P_IPV6)) in br_mdb_fill_info() 322 if (entry->addr.proto == htons(ETH_P_IP)) { in is_valid_mdb_entry() 328 } else if (entry->addr.proto == htons(ETH_P_IPV6)) { in is_valid_mdb_entry() 451 if (ip.proto == htons(ETH_P_IP)) in __br_mdb_add() 525 if (ip.proto == htons(ETH_P_IP)) in __br_mdb_del()
|
D | br_input.c | 89 if (parp->ar_pro != htons(ETH_P_IP) || in br_do_proxy_arp() 90 parp->ar_op != htons(ARPOP_REQUEST) || in br_do_proxy_arp() 168 if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP)) in br_handle_frame_finish()
|
D | br_forward.c | 50 (skb->protocol == htons(ETH_P_8021Q) || in br_dev_queue_push_xmit() 51 skb->protocol == htons(ETH_P_8021AD))) { in br_dev_queue_push_xmit()
|
D | br_vlan.c | 605 if (!br->vlan_enabled || br->vlan_proto == htons(ETH_P_8021Q)) { in recalculate_group_addr() 618 if (!br->vlan_enabled || br->vlan_proto == htons(ETH_P_8021Q)) in br_recalculate_fwd_mask() 708 err = __br_vlan_set_proto(br, htons(val)); in br_vlan_set_proto() 872 br->vlan_proto = htons(ETH_P_8021Q); in br_vlan_init()
|
/linux-4.4.14/net/openvswitch/ |
D | flow.c | 68 #define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) 278 if (frag_off & htons(~0x7)) in parse_ipv6hdr() 321 key->eth.tci = qp->tci | htons(VLAN_TAG_PRESENT); in parse_vlan() 346 return htons(ETH_P_802_2); in parse_ethertype() 349 return htons(0); in parse_ethertype() 355 return htons(ETH_P_802_2); in parse_ethertype() 362 return htons(ETH_P_802_2); in parse_ethertype() 373 key->tp.src = htons(icmp->icmp6_type); in parse_icmpv6() 374 key->tp.dst = htons(icmp->icmp6_code); in parse_icmpv6() 485 key->eth.tci = htons(skb->vlan_tci); in key_extract() [all …]
|
D | flow_netlink.c | 149 if (match->key->eth.type == htons(ETH_P_ARP) in match_validate() 150 || match->key->eth.type == htons(ETH_P_RARP)) { in match_validate() 152 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 158 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 162 if (match->key->eth.type == htons(ETH_P_IP)) { in match_validate() 164 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 197 if (match->key->eth.type == htons(ETH_P_IPV6)) { in match_validate() 199 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 230 htons(NDISC_NEIGHBOUR_SOLICITATION) || in match_validate() 231 match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { in match_validate() [all …]
|
D | actions.c | 132 key->eth.type = htons(0); in invalidate_flow_key() 293 if (nh->frag_off & htons(IP_OFFSET)) in update_ip_l4_checksum() 383 csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8)); in set_ip_ttl() 688 if (ethertype == htons(ETH_P_IP)) { in ovs_fragment() 703 } else if (ethertype == htons(ETH_P_IPV6)) { in ovs_fragment()
|
/linux-4.4.14/net/6lowpan/ |
D | nhc_udp.c | 60 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 64 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 69 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4)); in udp_uncompress() 70 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f)); in udp_uncompress() 97 uh.len = htons(lowpan_802154_cb(skb)->d_size - in udp_uncompress() 100 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress() 103 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress()
|
D | iphc.c | 553 hdr.payload_len = htons(lowpan_802154_cb(skb)->d_size - in lowpan_header_decompress() 556 hdr.payload_len = htons(skb->len); in lowpan_header_decompress() 559 hdr.payload_len = htons(skb->len); in lowpan_header_decompress() 750 if (skb->protocol != htons(ETH_P_IPV6)) in lowpan_header_compress()
|
/linux-4.4.14/net/bridge/netfilter/ |
D | nf_log_bridge.c | 28 case htons(ETH_P_IP): in nf_log_bridge_packet() 32 case htons(ETH_P_IPV6): in nf_log_bridge_packet() 36 case htons(ETH_P_ARP): in nf_log_bridge_packet() 37 case htons(ETH_P_RARP): in nf_log_bridge_packet()
|
D | ebt_arp.c | 42 if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP)) in ebt_arp_mt() 70 if (ah->ar_hln != ETH_ALEN || ah->ar_hrd != htons(ARPHRD_ETHER)) in ebt_arp_mt() 108 if ((e->ethproto != htons(ETH_P_ARP) && in ebt_arp_mt_check() 109 e->ethproto != htons(ETH_P_RARP)) || in ebt_arp_mt_check()
|
D | nft_reject_bridge.c | 69 niph->tot_len = htons(nskb->len); in nft_reject_br_send_v4_tcp_reset() 93 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) in nft_reject_br_send_v4_unreach() 136 niph->tot_len = htons(nskb->len); in nft_reject_br_send_v4_unreach() 171 nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr)); in nft_reject_br_send_v6_tcp_reset() 196 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_br_csum_ok() 244 nip6h->payload_len = htons(nskb->len - sizeof(struct ipv6hdr)); in nft_reject_br_send_v6_unreach() 271 case htons(ETH_P_IP): in nft_reject_bridge_eval() 289 case htons(ETH_P_IPV6): in nft_reject_bridge_eval()
|
D | ebt_log.c | 99 htons(ETH_P_IP)) { in ebt_log_packet() 116 htons(ETH_P_IPV6)) { in ebt_log_packet() 140 ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || in ebt_log_packet() 141 (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { in ebt_log_packet() 156 if (ah->ar_hrd == htons(1) && in ebt_log_packet()
|
D | ebt_arpreply.c | 33 if (ap->ar_op != htons(ARPOP_REQUEST) || in ebt_arpreply_tg() 35 ap->ar_pro != htons(ETH_P_IP) || in ebt_arpreply_tg() 67 if (e->ethproto != htons(ETH_P_ARP) || in ebt_arpreply_tg_check()
|
D | ebt_among.c | 72 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_dst() 80 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_dst() 103 if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { in get_ip_src() 111 } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in get_ip_src()
|
D | nf_tables_bridge.c | 97 case htons(ETH_P_IP): in nft_do_chain_bridge() 100 case htons(ETH_P_IPV6): in nft_do_chain_bridge()
|
D | ebt_snat.c | 29 eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { in ebt_snat_tg()
|
D | ebt_vlan.c | 94 if (e->ethproto != htons(ETH_P_8021Q)) { in ebt_vlan_mt_check()
|
/linux-4.4.14/include/scsi/ |
D | fc_encode.h | 118 ct->hdr.ct_cmd = htons((u16) op); in fc_ct_hdr_fill() 549 csp->sp_bb_cred = htons(10); /* this gets set by gateway */ in fc_plogi_fill() 550 csp->sp_bb_data = htons((u16) lport->mfs); in fc_plogi_fill() 552 cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); in fc_plogi_fill() 553 csp->sp_features = htons(FC_SP_FT_CIRO); in fc_plogi_fill() 554 csp->sp_tot_seq = htons(255); /* seq. we accept */ in fc_plogi_fill() 555 csp->sp_rel_off = htons(0x1f); in fc_plogi_fill() 558 cp->cp_rdfs = htons((u16) lport->mfs); in fc_plogi_fill() 559 cp->cp_con_seq = htons(255); in fc_plogi_fill() 580 sp->sp_bb_cred = htons(10); /* this gets set by gateway */ in fc_flogi_fill() [all …]
|
/linux-4.4.14/net/ipv4/ |
D | arp.c | 544 skb->protocol = htons(ETH_P_ARP); in arp_create() 568 arp->ar_hrd = htons(dev->type); in arp_create() 569 arp->ar_pro = htons(ETH_P_IP); in arp_create() 574 arp->ar_hrd = htons(ARPHRD_AX25); in arp_create() 575 arp->ar_pro = htons(AX25_P_IP); in arp_create() 580 arp->ar_hrd = htons(ARPHRD_NETROM); in arp_create() 581 arp->ar_pro = htons(AX25_P_IP); in arp_create() 588 arp->ar_hrd = htons(ARPHRD_ETHER); in arp_create() 589 arp->ar_pro = htons(ETH_P_IP); in arp_create() 596 arp->ar_op = htons(type); in arp_create() [all …]
|
D | xfrm4_output.c | 28 if (!(ip_hdr(skb)->frag_off & htons(IP_DF)) || skb->ignore_df) in xfrm4_tunnel_check_size() 33 skb->protocol = htons(ETH_P_IP); in xfrm4_tunnel_check_size() 68 skb->protocol = htons(ETH_P_IP); in xfrm4_prepare_output()
|
D | xfrm4_state.c | 32 sel->dport_mask = htons(0xffff); in __xfrm4_init_tempsel() 34 sel->sport_mask = htons(0xffff); in __xfrm4_init_tempsel() 76 .eth_proto = htons(ETH_P_IP),
|
D | ip_output.c | 103 iph->tot_len = htons(skb->len); in __ip_local_out() 155 iph->frag_off = htons(IP_DF); in ip_build_and_send_pkt() 299 skb->protocol = htons(ETH_P_IP); in ip_mc_output() 357 skb->protocol = htons(ETH_P_IP); in ip_output() 435 *((__be16 *)iph) = htons((4 << 12) | (5 << 8) | (inet->tos & 0xff)); in ip_queue_xmit() 437 iph->frag_off = htons(IP_DF); in ip_queue_xmit() 499 if ((iph->frag_off & htons(IP_DF)) == 0) in ip_fragment() 604 iph->tot_len = htons(first_len); in ip_do_fragment() 605 iph->frag_off = htons(IP_MF); in ip_do_fragment() 618 iph->tot_len = htons(frag->len); in ip_do_fragment() [all …]
|
D | ipip.c | 183 .proto = htons(ETH_P_IP), 220 if (unlikely(skb->protocol != htons(ETH_P_IP))) in ipip_tunnel_xmit() 250 p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF))) in ipip_tunnel_ioctl() 334 parms->iph.frag_off = htons(IP_DF); in ipip_netlink_parms() 341 parms->iph.frag_off = htons(IP_DF); in ipip_netlink_parms() 456 !!(parm->iph.frag_off & htons(IP_DF)))) in ipip_fill_info()
|
D | ip_tunnel.c | 616 if (skb->protocol == htons(ETH_P_IP)) { in tnl_update_pmtu() 618 (inner_iph->frag_off & htons(IP_DF)) && in tnl_update_pmtu() 626 else if (skb->protocol == htons(ETH_P_IPV6)) { in tnl_update_pmtu() 677 if (skb->protocol == htons(ETH_P_IP)) { in ip_tunnel_xmit() 682 else if (skb->protocol == htons(ETH_P_IPV6)) { in ip_tunnel_xmit() 721 if (skb->protocol == htons(ETH_P_IP)) { in ip_tunnel_xmit() 724 } else if (skb->protocol == htons(ETH_P_IPV6)) { in ip_tunnel_xmit() 773 if (skb->protocol == htons(ETH_P_IP)) in ip_tunnel_xmit() 776 else if (skb->protocol == htons(ETH_P_IPV6)) in ip_tunnel_xmit() 784 if (skb->protocol == htons(ETH_P_IP)) in ip_tunnel_xmit() [all …]
|
D | xfrm4_input.c | 53 iph->tot_len = htons(skb->len); in xfrm4_transport_finish() 134 iph->tot_len = htons(ntohs(iph->tot_len) - len); in xfrm4_udp_encap_rcv()
|
D | ipconfig.c | 528 if (rarp->ar_op != htons(ARPOP_RREPLY)) in ic_rarp_recv() 532 if (rarp->ar_pro != htons(ETH_P_IP)) in ic_rarp_recv() 830 h->tot_len = htons(sizeof(struct bootp_pkt)); in ic_bootp_send_if() 831 h->frag_off = htons(IP_DF); in ic_bootp_send_if() 838 b->udph.source = htons(68); in ic_bootp_send_if() 839 b->udph.dest = htons(67); in ic_bootp_send_if() 840 b->udph.len = htons(sizeof(struct bootp_pkt) - sizeof(struct iphdr)); in ic_bootp_send_if() 857 b->secs = htons(jiffies_diff / HZ); in ic_bootp_send_if() 870 skb->protocol = htons(ETH_P_IP); in ic_bootp_send_if() 1003 if (b->udph.source != htons(67) || b->udph.dest != htons(68)) in ic_bootp_recv()
|
D | ip_gre.c | 235 if (greh->flags == 0 && tpi->proto == htons(ETH_P_WCCP)) { in parse_gre_header() 236 tpi->proto = htons(ETH_P_IP); in parse_gre_header() 299 if (tpi->proto == htons(ETH_P_TEB)) in ipgre_err() 392 if (tpi->proto == htons(ETH_P_TEB)) in ipgre_rcv() 566 build_header(skb, tunnel_hlen, flags, htons(ETH_P_TEB), in gre_fb_xmit() 569 df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0; in gre_fb_xmit() 663 __gre_xmit(skb, dev, &tunnel->parms.iph, htons(ETH_P_TEB)); in gre_tap_xmit() 683 p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)) || in ipgre_tunnel_ioctl() 740 greh->protocol = htons(type); in ipgre_header() 998 parms->iph.frag_off = htons(IP_DF); in ipgre_netlink_parms() [all …]
|
D | ping.c | 179 if (skb->protocol == htons(ETH_P_IP)) { in ping_lookup() 183 } else if (skb->protocol == htons(ETH_P_IPV6)) { in ping_lookup() 198 if (skb->protocol == htons(ETH_P_IP) && in ping_lookup() 208 } else if (skb->protocol == htons(ETH_P_IPV6) && in ping_lookup() 453 isk->inet_sport = htons(isk->inet_num); in ping_bind() 497 if (skb->protocol == htons(ETH_P_IP)) { in ping_err() 502 } else if (skb->protocol == htons(ETH_P_IPV6)) { in ping_err() 531 if (skb->protocol == htons(ETH_P_IP)) { in ping_err() 570 } else if (skb->protocol == htons(ETH_P_IPV6)) { in ping_err() 925 if (skb->protocol == htons(ETH_P_IPV6) && in ping_recvmsg() [all …]
|
D | inet_lro.c | 118 csum_replace2(&iph->check, iph->tot_len, htons(lro_desc->ip_tot_len)); in lro_update_tcp_ip_header() 119 iph->tot_len = htons(lro_desc->ip_tot_len); in lro_update_tcp_ip_header() 315 if ((skb->protocol == htons(ETH_P_8021Q)) && in __lro_proc_skb()
|
D | af_inet.c | 185 inet->inet_sport = htons(inet->inet_num); in inet_autobind() 371 inet->inet_sport = htons(inet->inet_num); in inet_create() 507 inet->inet_sport = htons(inet->inet_num); in inet_bind() 1270 iph->id = htons(id); in inet_gso_segment() 1271 iph->frag_off = htons(offset >> 3); in inet_gso_segment() 1273 iph->frag_off |= htons(IP_MF); in inet_gso_segment() 1276 iph->id = htons(id++); in inet_gso_segment() 1278 iph->tot_len = htons(skb->len - nhoff); in inet_gso_segment() 1351 ((iph->frag_off ^ iph2->frag_off) & htons(IP_DF)); in inet_gro_receive() 1399 __be16 newlen = htons(skb->len - nhoff); in inet_gro_complete()
|
D | xfrm4_mode_transport.c | 52 ip_hdr(skb)->tot_len = htons(skb->len + ihl); in xfrm4_transport_input()
|
D | fou.c | 58 iph->tot_len = htons(ntohs(iph->tot_len) - len); in fou_recv_pull() 139 ip_hdr(skb)->tot_len = htons(ntohs(ip_hdr(skb)->tot_len) - len); in gue_udp_recv() 776 uh->len = htons(skb->len); in fou_build_udp() 863 pd[0] = htons(csum_start); in gue_build_header() 864 pd[1] = htons(csum_start + skb->csum_offset); in gue_build_header()
|
/linux-4.4.14/include/net/ |
D | inet_ecn.h | 94 check += (__force u16)htons(0xFFFB) + (__force u16)htons(ecn); in IP_ECN_set_ce() 215 if (skb->protocol == htons(ETH_P_IP)) in IP_ECN_decapsulate() 217 else if (skb->protocol == htons(ETH_P_IPV6)) in IP_ECN_decapsulate() 230 if (skb->protocol == htons(ETH_P_IP)) in IP6_ECN_decapsulate() 232 else if (skb->protocol == htons(ETH_P_IPV6)) in IP6_ECN_decapsulate()
|
D | dsfield.h | 38 iph->check = (__force __sum16)htons(check); in ipv4_change_dsfield() 48 *p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4); in ipv6_change_dsfield()
|
D | mpls.h | 24 return eth_type == htons(ETH_P_MPLS_UC) || in eth_p_mpls() 25 eth_type == htons(ETH_P_MPLS_MC); in eth_p_mpls()
|
D | vxlan.h | 220 case htons(ETH_P_IP): in vxlan_features_check() 223 case htons(ETH_P_IPV6): in vxlan_features_check() 232 skb->inner_protocol != htons(ETH_P_TEB) || in vxlan_features_check()
|
D | udplite.h | 85 udp_hdr(skb)->len = htons(up->pcslen); in udplite_csum_outgoing() 123 udp_hdr(skb)->len = htons(up->pcslen); in udplite_csum()
|
D | x25device.h | 15 return htons(ETH_P_X25); in x25_type_trans()
|
D | llc_pdu.h | 253 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_sa() 266 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_da() 340 if (ev_skb->protocol == htons(ETH_P_802_2)) { in llc_pdu_init_as_test_rsp()
|
D | gue.h | 55 #define GUE_FLAG_PRIV htons(1<<0) /* Private flags are in options */
|
D | ip.h | 263 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; in ip_is_fragment() 275 check += (__force u32)htons(0x0100); in ip_decrease_ttl() 341 if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) { in ip_select_ident_segs() 348 iph->id = htons(inet_sk(sk)->inet_id); in ip_select_ident_segs()
|
D | ip_tunnels.h | 259 if (skb->protocol == htons(ETH_P_IP)) in ip_tunnel_get_dsfield() 261 else if (skb->protocol == htons(ETH_P_IPV6)) in ip_tunnel_get_dsfield()
|
/linux-4.4.14/net/core/ |
D | flow_dissector.c | 170 case htons(ETH_P_IP): { in __skb_flow_dissect() 194 if (iph->frag_off & htons(IP_OFFSET)) { in __skb_flow_dissect() 208 case htons(ETH_P_IPV6): { in __skb_flow_dissect() 254 case htons(ETH_P_8021AD): in __skb_flow_dissect() 255 case htons(ETH_P_8021Q): { in __skb_flow_dissect() 276 case htons(ETH_P_PPP_SES): { in __skb_flow_dissect() 287 case htons(PPP_IP): in __skb_flow_dissect() 289 case htons(PPP_IPV6): in __skb_flow_dissect() 295 case htons(ETH_P_TIPC): { in __skb_flow_dissect() 315 case htons(ETH_P_MPLS_UC): in __skb_flow_dissect() [all …]
|
D | tso.c | 26 iph->id = htons(tso->ip_id); in tso_build_hdr() 27 iph->tot_len = htons(size + hdr_len - mac_hdr_len); in tso_build_hdr() 32 iph->payload_len = htons(size + tcp_hdrlen(skb)); in tso_build_hdr() 71 tso->ipv6 = vlan_get_protocol(skb) == htons(ETH_P_IPV6); in tso_start()
|
D | netpoll.c | 409 udph->source = htons(np->local_port); in netpoll_send_udp() 410 udph->dest = htons(np->remote_port); in netpoll_send_udp() 411 udph->len = htons(udp_len); in netpoll_send_udp() 432 ip6h->payload_len = htons(sizeof(struct udphdr) + len); in netpoll_send_udp() 440 skb->protocol = eth->h_proto = htons(ETH_P_IPV6); in netpoll_send_udp() 457 put_unaligned(htons(ip_len), &(iph->tot_len)); in netpoll_send_udp() 458 iph->id = htons(atomic_inc_return(&ip_ident)); in netpoll_send_udp() 469 skb->protocol = eth->h_proto = htons(ETH_P_IP); in netpoll_send_udp()
|
D | pktgen.c | 2673 iph->tot_len = htons(skb->len - ETH_HLEN); in process_ipsec() 2697 return htons(id | (cfi << 12) | (prio << 13)); in build_tci() 2805 __be16 protocol = htons(ETH_P_IP); in fill_packet_ipv4() 2814 protocol = htons(ETH_P_MPLS_UC); in fill_packet_ipv4() 2817 protocol = htons(ETH_P_8021Q); in fill_packet_ipv4() 2849 *svlan_encapsulated_proto = htons(ETH_P_8021Q); in fill_packet_ipv4() 2856 *vlan_encapsulated_proto = htons(ETH_P_IP); in fill_packet_ipv4() 2877 udph->source = htons(pkt_dev->cur_udp_src); in fill_packet_ipv4() 2878 udph->dest = htons(pkt_dev->cur_udp_dst); in fill_packet_ipv4() 2879 udph->len = htons(datalen + 8); /* DATA + udphdr */ in fill_packet_ipv4() [all …]
|
/linux-4.4.14/net/ipv4/netfilter/ |
D | nf_nat_h323.c | 205 htons(ntohs(info->rtp_port[i][dir]) + 1); in nat_rtp_rtcp() 224 rtp_exp->tuple.dst.u.udp.port = htons(nated_port); in nat_rtp_rtcp() 228 htons(nated_port + 1); in nat_rtp_rtcp() 254 htons((port & htons(1)) ? nated_port + 1 : in nat_rtp_rtcp() 258 info->rtp_port[i][!dir] = htons(nated_port); in nat_rtp_rtcp() 299 exp->tuple.dst.u.tcp.port = htons(nated_port); in nat_t120() 317 htons(nated_port)) < 0) { in nat_t120() 355 exp->tuple.dst.u.tcp.port = htons(nated_port); in nat_h245() 373 htons(nated_port)) == 0) { in nat_h245() 376 info->sig_port[!dir] = htons(nated_port); in nat_h245() [all …]
|
D | nf_reject_ipv4.c | 25 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) in nf_reject_ip_tcphdr_get() 57 niph->frag_off = htons(IP_DF); in nf_reject_iphdr_put() 64 nskb->protocol = htons(ETH_P_IP); in nf_reject_iphdr_put() 152 niph->tot_len = htons(nskb->len); in nf_send_reset() 174 if (skb_in->csum_bad || iph->frag_off & htons(IP_OFFSET)) in nf_send_unreach()
|
D | nf_dup_ipv4.c | 48 skb->protocol = htons(ETH_P_IP); in nf_dup_ipv4_route() 87 iph->frag_off |= htons(IP_DF); in nf_dup_ipv4()
|
D | ipt_ECN.c | 41 csum_replace2(&iph->check, htons(oldtos), htons(iph->tos)); in set_ect_ip()
|
D | ipt_SYNPROXY.c | 31 iph->frag_off = htons(IP_DF); in synproxy_build_ip() 56 nskb->protocol = htons(ETH_P_IP); in synproxy_send_tcp() 189 nth->window = htons(state->seen[IP_CT_DIR_ORIGINAL].td_maxwin); in synproxy_send_server_ack() 227 nth->window = htons(ntohs(th->window) >> opts->wscale); in synproxy_send_client_ack()
|
D | ipt_CLUSTERIP.c | 520 if (arp->ar_hrd != htons(ARPHRD_ETHER) || in arp_mangle() 521 arp->ar_pro != htons(ETH_P_IP) || in arp_mangle() 526 if (arp->ar_op != htons(ARPOP_REPLY) && in arp_mangle() 527 arp->ar_op != htons(ARPOP_REQUEST)) in arp_mangle()
|
D | nf_nat_proto_icmp.c | 48 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmp_unique_tuple()
|
D | nf_nat_proto_gre.c | 74 *keyptr = htons(min + key % range_size); in gre_unique_tuple()
|
/linux-4.4.14/include/uapi/linux/ |
D | tipc_config.h | 282 tlv->tlv_len = htons(len); in TLV_SET_LEN() 292 tlv->tlv_type = htons(type); in TLV_SET_TYPE() 302 tlv_ptr->tlv_type = htons(type); in TLV_SET() 303 tlv_ptr->tlv_len = htons(tlv_len); in TLV_SET() 400 tcm_hdr->tcm_type = htons(cmd); in TCM_SET() 401 tcm_hdr->tcm_flags = htons(flags); in TCM_SET()
|
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx4/ |
D | fw_qos.c | 134 htons(MLX4_RATELIMIT_100M_UNITS); in mlx4_SET_PORT_SCHEDULER() 138 htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER() 140 tc->max_bw_value = htons(r); in mlx4_SET_PORT_SCHEDULER() 142 tc->max_bw_value = htons(MLX4_RATELIMIT_DEFAULT); in mlx4_SET_PORT_SCHEDULER() 143 tc->max_bw_units = htons(MLX4_RATELIMIT_1G_UNITS); in mlx4_SET_PORT_SCHEDULER() 146 tc->pg = htons(pg[i]); in mlx4_SET_PORT_SCHEDULER() 147 tc->bw_precentage = htons(tc_tx_bw[i]); in mlx4_SET_PORT_SCHEDULER()
|
/linux-4.4.14/net/appletalk/ |
D | aarp.c | 127 skb->protocol = htons(ETH_P_ATALK); in __aarp_send_query() 132 eah->hw_type = htons(AARP_HW_TYPE_ETHERNET); in __aarp_send_query() 133 eah->pa_type = htons(ETH_P_ATALK); in __aarp_send_query() 136 eah->function = htons(AARP_REQUEST); in __aarp_send_query() 174 skb->protocol = htons(ETH_P_ATALK); in aarp_send_reply() 179 eah->hw_type = htons(AARP_HW_TYPE_ETHERNET); in aarp_send_reply() 180 eah->pa_type = htons(ETH_P_ATALK); in aarp_send_reply() 183 eah->function = htons(AARP_REPLY); in aarp_send_reply() 225 skb->protocol = htons(ETH_P_ATALK); in aarp_send_probe() 230 eah->hw_type = htons(AARP_HW_TYPE_ETHERNET); in aarp_send_probe() [all …]
|
D | ddp.c | 269 atif->address.s_net = htons(probe_net); in atif_probe_device() 318 proxy_addr->s_net = htons(probe_net); in atif_proxy_probe_device() 492 atrtr_default.gateway.s_net = htons(0); in atrtr_set_default() 763 if (nr->nr_firstnet == htons(0) && in atif_ioctl() 764 nr->nr_lastnet == htons(0xFFFE)) { in atif_ioctl() 778 sa->sat_addr.s_net = htons(ct); in atif_ioctl() 1004 return sum ? htons((unsigned short)sum) : htons(0xFFFF); in atalk_checksum() 1117 if (!ap || ap->s_net == htons(ATADDR_ANYNET)) in atalk_autobind() 1146 if (addr->sat_addr.s_net == htons(ATADDR_ANYNET)) { in atalk_bind() 1298 skb->protocol = htons(ETH_P_IP); in handle_ip_over_ddp() [all …]
|
/linux-4.4.14/net/netfilter/ipvs/ |
D | ip_vs_proto_ah_esp.c | 50 &iph->saddr, htons(PORT_ISAKMP), in ah_esp_conn_fill_param_proto() 51 &iph->daddr, htons(PORT_ISAKMP), p); in ah_esp_conn_fill_param_proto() 54 &iph->daddr, htons(PORT_ISAKMP), in ah_esp_conn_fill_param_proto() 55 &iph->saddr, htons(PORT_ISAKMP), p); in ah_esp_conn_fill_param_proto()
|
D | ip_vs_proto_udp.c | 186 htons(oldlen), in udp_snat_handler() 187 htons(skb->len - udphoff)); in udp_snat_handler() 270 htons(oldlen), in udp_dnat_handler() 271 htons(skb->len - udphoff)); in udp_dnat_handler()
|
D | ip_vs_sync.c | 345 sb->mesg->size = htons(sizeof(struct ip_vs_sync_mesg)); in ip_vs_sync_buff_create() 430 mesg->size = htons(sizeof(struct ip_vs_sync_mesg_v0)); in ip_vs_sync_buff_create_v0() 597 s->flags = htons(cp->flags & ~IP_VS_CONN_F_HASHED); in ip_vs_sync_conn_v0() 598 s->state = htons(cp->state); in ip_vs_sync_conn_v0() 606 m->size = htons(ntohs(m->size) + len); in ip_vs_sync_conn_v0() 710 m->size = htons(ntohs(m->size) + pad + len); in ip_vs_sync_conn() 719 s->v4.ver_size = htons(len & SVER_MASK); /* Version 0 */ in ip_vs_sync_conn() 721 s->v4.state = htons(cp->state); in ip_vs_sync_conn() 1475 .sin6_port = htons(c->mcast_port + id), in get_mcast_sockaddr() 1482 .sin_port = htons(c->mcast_port + id), in get_mcast_sockaddr()
|
D | ip_vs_ftp.c | 394 htons(ntohs(cp->vport)-1), &p); in ip_vs_ftp_in() 399 htons(ntohs(cp->dport)-1), in ip_vs_ftp_in()
|
D | ip_vs_proto_tcp.c | 192 htons(oldlen), in tcp_snat_handler() 193 htons(skb->len - tcphoff)); in tcp_snat_handler() 275 htons(oldlen), in tcp_dnat_handler() 276 htons(skb->len - tcphoff)); in tcp_dnat_handler()
|
/linux-4.4.14/net/phonet/ |
D | pep-gprs.c | 53 return htons(0); in gprs_type_trans() 57 return htons(ETH_P_IP); in gprs_type_trans() 59 return htons(ETH_P_IPV6); in gprs_type_trans() 61 return htons(0); in gprs_type_trans() 193 case htons(ETH_P_IP): in gprs_xmit() 194 case htons(ETH_P_IPV6): in gprs_xmit()
|
/linux-4.4.14/drivers/net/wan/lmc/ |
D | lmc_proto.c | 108 return htons(ETH_P_802_2); in lmc_proto_type() 111 return htons(ETH_P_802_2); in lmc_proto_type() 115 return htons(ETH_P_802_2); in lmc_proto_type()
|
/linux-4.4.14/net/tipc/ |
D | udp_media.c | 167 skb_set_inner_protocol(skb, htons(ETH_P_TIPC)); in tipc_udp_send_msg() 173 if (dst->proto == htons(ETH_P_IP)) { in tipc_udp_send_msg() 308 local->proto = htons(ETH_P_IP); in parse_options() 313 remote->proto = htons(ETH_P_IP); in parse_options() 323 local->proto = htons(ETH_P_IPV6); in parse_options() 329 remote->proto = htons(ETH_P_IPV6); in parse_options() 372 if (local.proto == htons(ETH_P_IP)) { in tipc_udp_enable() 387 } else if (local.proto == htons(ETH_P_IPV6)) { in tipc_udp_enable()
|
/linux-4.4.14/samples/bpf/ |
D | tcbpf1_kern.c | 26 bpf_l3_csum_replace(skb, IP_CSUM_OFF, htons(old_tos), htons(new_tos), 2); in set_ip_tos() 47 __u16 old_port = htons(load_half(skb, TCP_DPORT_OFF)); in set_tcp_dest_port()
|
D | libbpf.c | 130 sock = socket(PF_PACKET, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, htons(ETH_P_ALL)); in open_raw_sock() 139 sll.sll_protocol = htons(ETH_P_ALL); in open_raw_sock()
|
/linux-4.4.14/net/netfilter/ |
D | xt_TCPMSS.c | 146 htons(oldmss), htons(newmss), in tcpmss_mangle_packet() 188 htons(len), htons(len + TCPOLEN_MSS), true); in tcpmss_mangle_packet() 218 newlen = htons(ntohs(iph->tot_len) + ret); in tcpmss_tg4() 247 ipv6h->payload_len = htons(ntohs(ipv6h->payload_len) + ret); in tcpmss_tg6()
|
D | nft_queue.c | 89 if (nla_put_be16(skb, NFTA_QUEUE_NUM, htons(priv->queuenum)) || in nft_queue_dump() 90 nla_put_be16(skb, NFTA_QUEUE_TOTAL, htons(priv->queues_total)) || in nft_queue_dump() 91 nla_put_be16(skb, NFTA_QUEUE_FLAGS, htons(priv->flags))) in nft_queue_dump()
|
D | nf_nat_helper.c | 65 ip_hdr(skb)->tot_len = htons(skb->len); in mangle_contents() 69 htons(skb->len - sizeof(struct ipv6hdr)); in mangle_contents() 175 udph->len = htons(datalen); in nf_nat_mangle_udp_packet()
|
D | xt_HL.c | 60 csum_replace2(&iph->check, htons(iph->ttl << 8), in ttl_tg() 61 htons(new_ttl << 8)); in ttl_tg()
|
D | xt_TCPOPTSTRIP.c | 82 inet_proto_csum_replace2(&tcph->check, skb, htons(o), in tcpoptstrip_mangle_packet() 83 htons(n), false); in tcpoptstrip_mangle_packet()
|
D | xt_AUDIT.c | 149 case htons(ETH_P_IP): in audit_tg() 153 case htons(ETH_P_IPV6): in audit_tg()
|
D | nft_log.c | 153 if (nla_put_be16(skb, NFTA_LOG_GROUP, htons(li->u.ulog.group))) in nft_log_dump() 163 htons(li->u.ulog.qthreshold))) in nft_log_dump()
|
D | nf_tables_netdev.c | 98 case htons(ETH_P_IP): in nft_do_chain_netdev() 101 case htons(ETH_P_IPV6): in nft_do_chain_netdev()
|
D | nf_nat_sip.c | 245 htons(n) == ct->tuplehash[dir].tuple.dst.u.udp.port && in nf_nat_sip() 246 htons(n) != ct->tuplehash[!dir].tuple.src.u.udp.port) { in nf_nat_sip() 384 exp->tuple.dst.u.udp.port = htons(port); in nf_nat_sip_expect() 577 rtp_exp->tuple.dst.u.udp.port = htons(port); in nf_nat_sdp_media() 585 rtcp_exp->tuple.dst.u.udp.port = htons(port + 1); in nf_nat_sdp_media()
|
D | nf_nat_amanda.c | 50 exp->tuple.dst.u.tcp.port = htons(port); in help()
|
D | nf_conntrack_irc.c | 204 port = htons(dcc_port); in help() 257 irc[i].tuple.src.u.tcp.port = htons(ports[i]); in nf_conntrack_irc_init()
|
D | nf_conntrack_broadcast.c | 66 exp->mask.src.u.udp.port = htons(0xFFFF); in nf_conntrack_broadcast_help()
|
D | nf_nat_irc.c | 53 exp->tuple.dst.u.tcp.port = htons(port); in help()
|
D | nf_nat_proto_common.c | 88 *portptr = htons(min + off % range_size); in nf_nat_l4proto_unique_tuple()
|
/linux-4.4.14/net/ethernet/ |
D | eth.c | 86 eth->h_proto = htons(type); in eth_header() 88 eth->h_proto = htons(len); in eth_header() 181 return htons(ETH_P_XDSA); in eth_type_trans() 194 return htons(ETH_P_802_3); in eth_type_trans() 199 return htons(ETH_P_802_2); in eth_type_trans() 232 if (type == htons(ETH_P_802_3)) in eth_header_cache()
|
/linux-4.4.14/net/ipv6/ |
D | xfrm6_state.c | 33 sel->dport_mask = htons(0xffff); in __xfrm6_init_tempsel() 35 sel->sport_mask = htons(0xffff); in __xfrm6_init_tempsel() 162 XFRM_MODE_SKB_CB(skb)->frag_off = htons(IP_DF); in xfrm6_extract_header() 175 .eth_proto = htons(ETH_P_IPV6),
|
D | xfrm6_output.c | 82 skb->protocol = htons(ETH_P_IPV6); in xfrm6_tunnel_check_size() 118 skb->protocol = htons(ETH_P_IPV6); in xfrm6_prepare_output() 159 if (skb->protocol == htons(ETH_P_IPV6)) in __xfrm6_output()
|
D | ip6_offload.c | 120 ipv6h->payload_len = htons(skb->len - nhoff - sizeof(*ipv6h)); in ipv6_gso_segment() 126 fptr->frag_off = htons(offset); in ipv6_gso_segment() 128 fptr->frag_off |= htons(IP6_MF); in ipv6_gso_segment() 270 iph->payload_len = htons(skb->len - nhoff - sizeof(*iph)); in ipv6_gro_complete()
|
D | ip6_udp_tunnel.c | 89 uh->len = htons(skb->len); in udp_tunnel6_xmit_skb() 102 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb()
|
D | ip6_output.c | 68 skb->protocol = htons(ETH_P_IPV6); in ip6_finish_output2() 216 hdr->payload_len = htons(seg_len); in ip6_xmit() 223 skb->protocol = htons(ETH_P_IPV6); in ip6_xmit() 663 fh->frag_off = htons(IP6_MF); in ip6_fragment() 669 ipv6_hdr(skb)->payload_len = htons(first_len - in ip6_fragment() 688 fh->frag_off = htons(offset); in ip6_fragment() 690 fh->frag_off |= htons(IP6_MF); in ip6_fragment() 693 htons(frag->len - in ip6_fragment() 810 fh->frag_off = htons(offset); in ip6_fragment() 812 fh->frag_off |= htons(IP6_MF); in ip6_fragment() [all …]
|
D | ila.c | 98 if (skb->protocol != htons(ETH_P_IPV6)) in ila_output() 114 if (skb->protocol != htons(ETH_P_IPV6)) in ila_input()
|
D | sit.c | 684 skb->protocol = htons(ETH_P_IPV6); in ipip6_rcv() 725 .proto = htons(ETH_P_IP), 784 if (v6dst->s6_addr16[0] == htons(0x2002)) { in check_6rd() 827 if (skb->protocol != htons(ETH_P_IPV6)) in ipip6_tunnel_xmit() 1023 case htons(ETH_P_IP): in sit_tunnel_xmit() 1026 case htons(ETH_P_IPV6): in sit_tunnel_xmit() 1200 p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF))) in ipip6_tunnel_ioctl() 1203 p.iph.frag_off |= htons(IP_DF); in ipip6_tunnel_ioctl() 1454 parms->iph.frag_off = htons(IP_DF); in ipip6_netlink_parms() 1461 parms->iph.frag_off = htons(IP_DF); in ipip6_netlink_parms() [all …]
|
D | xfrm6_mode_transport.c | 56 ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - in xfrm6_transport_input()
|
D | datagram.c | 248 skb->protocol = htons(ETH_P_IPV6); in ipv6_icmp_error() 283 skb->protocol = htons(ETH_P_IPV6); in ipv6_local_error() 375 if (skb->protocol == htons(ETH_P_IPV6)) in ip6_datagram_support_cmsg() 422 if (skb->protocol == htons(ETH_P_IPV6)) { in ipv6_recv_error() 447 if (skb->protocol == htons(ETH_P_IPV6)) { in ipv6_recv_error() 531 bool is_ipv6 = skb->protocol == htons(ETH_P_IPV6); in ip6_datagram_recv_common_ctl()
|
/linux-4.4.14/drivers/net/ethernet/sfc/ |
D | filter.h | 190 spec->ether_type = htons(ETH_P_IP); in efx_filter_set_ipv4_local() 215 spec->ether_type = htons(ETH_P_IP); in efx_filter_set_ipv4_full() 242 spec->outer_vid = htons(vid); in efx_filter_set_eth_local()
|
D | rx.c | 856 if (skb->protocol == htons(ETH_P_8021Q)) { in efx_filter_rfs() 872 if (ether_type != htons(ETH_P_IP) && ether_type != htons(ETH_P_IPV6)) in efx_filter_rfs() 884 if (ether_type == htons(ETH_P_IP)) { in efx_filter_rfs() 920 if (ether_type == htons(ETH_P_IP)) in efx_filter_rfs() 988 if (spec->ether_type == htons(ETH_P_IP) && in efx_filter_is_mc_recipient() 991 if (spec->ether_type == htons(ETH_P_IPV6) && in efx_filter_is_mc_recipient()
|
D | tx.c | 858 if (protocol == htons(ETH_P_8021Q)) { in efx_tso_check_protocol() 863 if (protocol == htons(ETH_P_IP)) { in efx_tso_check_protocol() 866 EFX_BUG_ON_PARANOID(protocol != htons(ETH_P_IPV6)); in efx_tso_check_protocol() 1026 if (st->protocol == htons(ETH_P_IP)) { in tso_start() 1184 if (st->protocol == htons(ETH_P_IP)) { in tso_start_new_packet() 1188 tsoh_iph->tot_len = htons(ip_length); in tso_start_new_packet() 1189 tsoh_iph->id = htons(st->ipv4_id); in tso_start_new_packet() 1194 tsoh_iph->payload_len = htons(ip_length); in tso_start_new_packet()
|
D | selftest.c | 379 payload->header.h_proto = htons(ETH_P_IP); in efx_iterate_state() 384 payload->ip.check = (__force __sum16) htons(0xdead); in efx_iterate_state() 385 payload->ip.tot_len = htons(sizeof(*payload) - sizeof(struct ethhdr)); in efx_iterate_state() 391 payload->udp.len = htons(sizeof(*payload) - sizeof(struct ethhdr) - in efx_iterate_state() 396 payload->iteration = htons(ntohs(payload->iteration) + 1); in efx_iterate_state()
|
/linux-4.4.14/net/sctp/ |
D | sm_make_chunk.c | 146 err.length = htons(len); in sctp_init_cause() 164 err.length = htons(len); in sctp_init_cause_fixed() 250 init.num_outbound_streams = htons(asoc->c.sinit_num_ostreams); in sctp_make_init() 251 init.num_inbound_streams = htons(asoc->c.sinit_max_instreams); in sctp_make_init() 338 sat.param_hdr.length = htons(SCTP_SAT_LEN(num_types)); in sctp_make_init() 350 htons(sizeof(sctp_supported_ext_param_t) + num_ext); in sctp_make_init() 361 aiparam.param_hdr.length = htons(sizeof(aiparam)); in sctp_make_init() 409 initack.num_outbound_streams = htons(asoc->c.sinit_num_ostreams); in sctp_make_init_ack() 410 initack.num_inbound_streams = htons(asoc->c.sinit_max_instreams); in sctp_make_init_ack() 492 htons(sizeof(sctp_supported_ext_param_t) + num_ext); in sctp_make_init_ack() [all …]
|
D | endpointola.c | 94 htons(sizeof(sctp_paramhdr_t) + 2); in sctp_endpoint_init() 95 auth_hmacs->hmac_ids[0] = htons(SCTP_AUTH_HMAC_ID_SHA1); in sctp_endpoint_init() 99 auth_chunks->param_hdr.length = htons(sizeof(sctp_paramhdr_t)); in sctp_endpoint_init() 108 htons(sizeof(sctp_paramhdr_t) + 2); in sctp_endpoint_init() 306 if ((htons(ep->base.bind_addr.port) == laddr->v4.sin_port) && in sctp_endpoint_is_match()
|
D | tsnmap.c | 346 gabs[ngaps].start = htons(start); in sctp_tsnmap_num_gabs() 347 gabs[ngaps].end = htons(end); in sctp_tsnmap_num_gabs()
|
D | ipv6.c | 260 fl6->fl6_sport = htons(asoc->base.bind_addr.port); in sctp_v6_get_dst() 286 sctp_v6_to_addr(&dst_saddr, &fl6->saddr, htons(bp->port)); in sctp_v6_get_dst() 489 param->v6.param_hdr.length = htons(length); in sctp_v6_to_addr_param() 751 addr->v4.sin_port = htons(asoc->peer.port); in sctp_inet6_event_msgname() 760 addr->v6.sin6_port = htons(asoc->peer.port); in sctp_inet6_event_msgname()
|
/linux-4.4.14/net/netfilter/ipset/ |
D | ip_set_getport.c | 73 *port = (__force __be16)htons((ic->type << 8) | ic->code); in get_port() 85 htons((ic->icmp6_type << 8) | ic->icmp6_code); in get_port() 143 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) in ip_set_get_ip6_port()
|
D | ip_set_bitmap_port.c | 92 htons(map->first_port + id)); in bitmap_port_do_list() 98 return nla_put_net16(skb, IPSET_ATTR_PORT, htons(map->first_port)) || in bitmap_port_do_head() 99 nla_put_net16(skb, IPSET_ATTR_PORT_TO, htons(map->last_port)); in bitmap_port_do_head()
|
/linux-4.4.14/net/batman-adv/ |
D | gateway_client.c | 689 if (proto == htons(ETH_P_8021Q)) { in batadv_gw_dhcp_recipient_get() 700 case htons(ETH_P_IP): in batadv_gw_dhcp_recipient_get() 712 case htons(ETH_P_IPV6): in batadv_gw_dhcp_recipient_get() 736 case htons(ETH_P_IP): in batadv_gw_dhcp_recipient_get() 737 if (udphdr->dest == htons(67)) in batadv_gw_dhcp_recipient_get() 739 else if (udphdr->source == htons(67)) in batadv_gw_dhcp_recipient_get() 742 case htons(ETH_P_IPV6): in batadv_gw_dhcp_recipient_get() 743 if (udphdr->dest == htons(547)) in batadv_gw_dhcp_recipient_get() 745 else if (udphdr->source == htons(547)) in batadv_gw_dhcp_recipient_get()
|
D | main.c | 346 case htons(ETH_P_8021Q): in batadv_skb_set_priority() 354 case htons(ETH_P_IP): in batadv_skb_set_priority() 361 case htons(ETH_P_IPV6): in batadv_skb_set_priority() 807 tvlv_new->tvlv_hdr.len = htons(tvlv_value_len); in batadv_tvlv_container_register() 1170 unicast_tvlv_packet->tvlv_len = htons(tvlv_len); in batadv_tvlv_unicast_send() 1179 tvlv_hdr->len = htons(tvlv_value_len); in batadv_tvlv_unicast_send() 1207 if (ethhdr->h_proto != htons(ETH_P_8021Q)) in batadv_get_vid()
|
D | distributed-arp-table.c | 854 if (ethhdr->h_proto != htons(ETH_P_ARP)) in batadv_arp_get_type() 865 if (arphdr->ar_hrd != htons(ARPHRD_ETHER)) in batadv_arp_get_type() 868 if (arphdr->ar_pro != htons(ETH_P_IP)) in batadv_arp_get_type() 893 if (arphdr->ar_op != htons(ARPOP_REQUEST)) { in batadv_arp_get_type() 995 skb_new = vlan_insert_tag(skb_new, htons(ETH_P_8021Q), in batadv_dat_snoop_outgoing_arp_request() 1075 skb_new = vlan_insert_tag(skb_new, htons(ETH_P_8021Q), in batadv_dat_snoop_incoming_arp_request()
|
D | bridge_loop_avoidance.c | 356 skb = vlan_insert_tag(skb, htons(ETH_P_8021Q), in batadv_bla_send_claim() 556 crc = htons(backbone_gw->crc); in batadv_bla_send_announce() 909 } while (proto == htons(ETH_P_8021Q)); in batadv_bla_process_claim() 912 if (proto != htons(ETH_P_ARP)) in batadv_bla_process_claim() 927 if (arphdr->ar_hrd != htons(ARPHRD_ETHER)) in batadv_bla_process_claim() 929 if (arphdr->ar_pro != htons(ETH_P_IP)) in batadv_bla_process_claim() 1114 group = htons(crc16(0, primary_if->net_dev->dev_addr, ETH_ALEN)); in batadv_bla_update_orig_address() 1252 bat_priv->bla.claim_dest.group = htons(crc); in batadv_bla_init()
|
D | soft-interface.c | 188 __be16 ethertype = htons(ETH_P_BATMAN); in batadv_interface_tx() 389 __be16 ethertype = htons(ETH_P_BATMAN); in batadv_interface_rx() 618 if (proto != htons(ETH_P_8021Q)) in batadv_interface_add_vid() 675 if (proto != htons(ETH_P_8021Q)) in batadv_interface_kill_vid()
|
/linux-4.4.14/drivers/net/arcnet/ |
D | rfc1201.c | 111 return htons(ETH_P_IP); in type_trans() 113 return htons(ETH_P_IPV6); in type_trans() 115 return htons(ETH_P_ARP); in type_trans() 117 return htons(ETH_P_RARP); in type_trans() 121 return htons(ETH_P_802_3); in type_trans() 128 return htons(ETH_P_IP); in type_trans() 423 soft->sequence = htons(lp->rfc1201.sequence++); in build_header() 458 excsoft.sequence = htons(0xffff); in load_pkt()
|
D | rfc1051.c | 107 return htons(ETH_P_IP); in type_trans() 109 return htons(ETH_P_ARP); in type_trans() 117 return htons(ETH_P_IP); in type_trans()
|
/linux-4.4.14/net/x25/ |
D | x25_dev.c | 174 skb->protocol = htons(ETH_P_X25); in x25_establish_link() 201 skb->protocol = htons(ETH_P_X25); in x25_terminate_link() 228 skb->protocol = htons(ETH_P_X25); in x25_send_frame()
|
/linux-4.4.14/drivers/net/ethernet/cisco/enic/ |
D | vnic_vic.c | 65 tlv->type = htons(type); in vic_provinfo_add_tlv() 66 tlv->length = htons(length); in vic_provinfo_add_tlv()
|
/linux-4.4.14/drivers/net/wan/ |
D | hdlc_ppp.c | 147 return htons(ETH_P_HDLC); in ppp_type_trans() 150 return htons(ETH_P_HDLC); in ppp_type_trans() 155 return htons(ETH_P_IP); in ppp_type_trans() 159 return htons(ETH_P_IPV6); in ppp_type_trans() 162 return htons(ETH_P_HDLC); in ppp_type_trans() 183 data->protocol = htons(PID_IP); in ppp_hard_header() 186 data->protocol = htons(PID_IPV6); in ppp_hard_header() 191 data->protocol = htons(type); in ppp_hard_header() 234 cp->len = htons(sizeof(struct cp_header) + magic_len + len); in ppp_tx_cp()
|
/linux-4.4.14/drivers/scsi/csiostor/ |
D | csio_mb.c | 322 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_CTRL_OFLD); in csio_mb_caps_config() 324 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_INITIATOR); in csio_mb_caps_config() 326 cmdp->fcoecaps |= htons(FW_CAPS_CONFIG_FCOE_TARGET); in csio_mb_caps_config() 460 cmdp->fl0size = htons(iq_params->fl0size); in csio_mb_iq_alloc() 461 cmdp->fl0size = htons(iq_params->fl1size); in csio_mb_iq_alloc() 509 cmdp->iqid |= htons(iq_params->iqid); in csio_mb_iq_write() 510 cmdp->fl0id |= htons(iq_params->fl0id); in csio_mb_iq_write() 511 cmdp->fl1id |= htons(iq_params->fl1id); in csio_mb_iq_write() 517 cmdp->iqdroprss_to_iqesize |= htons( in csio_mb_iq_write() 525 cmdp->iqsize |= htons(iq_params->iqsize); in csio_mb_iq_write() [all …]
|
/linux-4.4.14/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 85 nskb->protocol = htons(ETH_P_IPV6); in nf_reject_ip6hdr_put() 201 nskb->protocol = htons(ETH_P_IPV6); in nf_send_reset6() 202 ip6h->payload_len = htons(sizeof(struct tcphdr)); in nf_send_reset6() 229 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_csum_ok()
|
D | ip6t_eui64.c | 36 if (eth_hdr(skb)->h_proto == htons(ETH_P_IPV6)) { in eui64_mt6()
|
D | nf_conntrack_l3proto_ipv6.c | 88 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { in ipv6_get_l4proto() 126 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { in ipv6_helper() 150 if (protoff < 0 || (frag_off & htons(~0x7)) != 0) { in ipv6_confirm()
|
D | nf_dup_ipv6.c | 44 skb->protocol = htons(ETH_P_IPV6); in nf_dup_ipv6_route()
|
D | nf_nat_proto_icmpv6.c | 50 tuple->src.u.icmp.id = htons(ntohs(range->min_proto.icmp.id) + in icmpv6_unique_tuple()
|
D | nf_nat_l3proto_ipv6.c | 98 if ((frag_off & htons(~0x7)) == 0 && in nf_nat_ipv6_manip_pkt() 158 htons(oldlen), htons(datalen), true); in nf_nat_ipv6_csum_recalc()
|
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_rx.c | 110 if (eth->h_proto == htons(ETH_P_IP)) { in mlx5e_lro_update_hdr() 158 return (ethertype == htons(ETH_P_IP) || ethertype == htons(ETH_P_IPV6)); in is_first_ethertype_ip() 214 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), in mlx5e_build_rx_skb()
|
/linux-4.4.14/drivers/net/usb/ |
D | cdc_mbim.c | 213 case htons(ETH_P_IP): in is_ip_proto() 214 case htons(ETH_P_IPV6): in is_ip_proto() 326 netdev = __vlan_find_dev_deep_rcu(dev->net, htons(ETH_P_8021Q), in do_neigh_solicit() 368 __be16 proto = htons(ETH_P_802_3); in cdc_mbim_process_dgram() 377 proto = htons(ETH_P_IP); in cdc_mbim_process_dgram() 382 proto = htons(ETH_P_IPV6); in cdc_mbim_process_dgram() 405 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), tci); in cdc_mbim_process_dgram()
|
D | lg-vl600.c | 213 ethhdr->h_proto = htons(ETH_P_IPV6); in vl600_rx_fixup() 303 packet->h_proto = htons(ETH_P_IP); in vl600_tx_fixup()
|
/linux-4.4.14/drivers/net/slip/ |
D | slhc.c | 349 || (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000)) in slhc_compress() 560 thp->urg_ptr = htons(x); in slhc_uncompress() 567 thp->window = htons( ntohs(thp->window) + x); in slhc_uncompress() 587 ip->id = htons (ntohs (ip->id) + x); in slhc_uncompress() 589 ip->id = htons (ntohs (ip->id) + 1); in slhc_uncompress() 601 ip->tot_len = htons(len); in slhc_uncompress()
|
/linux-4.4.14/drivers/staging/gdm724x/ |
D | gdm_lte.c | 143 arp_out->ar_op = htons(ARPOP_REPLY); in gdm_lte_emulate_arp() 304 ipv6_out.payload_len = htons(sizeof(struct icmp6hdr) + in gdm_lte_emulate_ndp() 646 vlan_eth.h_vlan_TCI = htons(nic->vlan_id); in gdm_lte_netif_rx() 647 vlan_eth.h_vlan_proto = htons(ETH_P_8021Q); in gdm_lte_netif_rx() 653 eth.h_proto = htons(ETH_P_ARP); in gdm_lte_netif_rx() 654 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_ARP); in gdm_lte_netif_rx() 658 eth.h_proto = htons(ETH_P_IP); in gdm_lte_netif_rx() 659 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_IP); in gdm_lte_netif_rx() 661 eth.h_proto = htons(ETH_P_IPV6); in gdm_lte_netif_rx() 662 vlan_eth.h_vlan_encapsulated_proto = htons(ETH_P_IPV6); in gdm_lte_netif_rx()
|
/linux-4.4.14/net/bluetooth/bnep/ |
D | netdev.c | 80 r->len = htons(ETH_ALEN * 2); in bnep_net_set_mc_list() 101 r->len = htons(skb->len - len); in bnep_net_set_mc_list() 142 if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF)) in bnep_net_eth_proto()
|
/linux-4.4.14/net/sched/ |
D | act_vlan.c | 103 case htons(ETH_P_8021Q): in tcf_vlan_init() 104 case htons(ETH_P_8021AD): in tcf_vlan_init() 110 push_proto = htons(ETH_P_8021Q); in tcf_vlan_init()
|
D | em_ipset.c | 63 case htons(ETH_P_IP): in em_ipset_match() 69 case htons(ETH_P_IPV6): in em_ipset_match()
|
D | act_connmark.c | 48 if (skb->protocol == htons(ETH_P_IP)) { in tcf_connmark() 53 } else if (skb->protocol == htons(ETH_P_IPV6)) { in tcf_connmark()
|
D | sch_dsmark.c | 203 case htons(ETH_P_IP): in dsmark_enqueue() 211 case htons(ETH_P_IPV6): in dsmark_enqueue() 291 case htons(ETH_P_IP): in dsmark_dequeue() 295 case htons(ETH_P_IPV6): in dsmark_dequeue()
|
D | act_nat.c | 145 } else if ((iph->frag_off & htons(IP_OFFSET)) || in tcf_nat() 153 switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) { in tcf_nat()
|
D | cls_flow.c | 155 case htons(ETH_P_IP): in flow_get_nfct_src() 157 case htons(ETH_P_IPV6): in flow_get_nfct_src() 167 case htons(ETH_P_IP): in flow_get_nfct_dst() 169 case htons(ETH_P_IPV6): in flow_get_nfct_dst()
|
/linux-4.4.14/drivers/net/wireless/ipw2x00/ |
D | libipw_tx.c | 139 if (h_proto == htons(ETH_P_AARP) || h_proto == htons(ETH_P_IPX)) in libipw_copy_snap() 229 if (eth->h_proto != htons(ETH_P_IP)) in libipw_classify() 299 encrypt = !(ether_type == htons(ETH_P_PAE) && ieee->ieee802_1x) && in libipw_xmit() 306 ieee->drop_unencrypted && ether_type != htons(ETH_P_PAE)) { in libipw_xmit()
|
/linux-4.4.14/drivers/scsi/fnic/ |
D | fnic_fcs.c | 358 vlan->eth.h_proto = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req() 361 vlan->fip.fip_op = htons(FIP_OP_VLAN); in fnic_fcoe_send_vlan_req() 363 vlan->fip.fip_dl_len = htons(sizeof(vlan->desc) / FIP_BPW); in fnic_fcoe_send_vlan_req() 375 skb->protocol = htons(ETH_P_FIP); in fnic_fcoe_send_vlan_req() 595 if (eh->h_proto == htons(ETH_P_FIP)) { in fnic_handle_fip_frame() 638 if (eh->h_proto == htons(ETH_P_8021Q)) { in fnic_import_rq_eth_pkt() 643 if (eh->h_proto == htons(ETH_P_FIP)) { in fnic_import_rq_eth_pkt() 658 if (eh->h_proto != htons(ETH_P_FCOE)) in fnic_import_rq_eth_pkt() 1003 vlan_hdr->h_vlan_proto = htons(ETH_P_8021Q); in fnic_eth_send() 1005 vlan_hdr->h_vlan_TCI = htons(fnic->vlan_id); in fnic_eth_send() [all …]
|
/linux-4.4.14/fs/afs/ |
D | fsclient.c | 297 call->port = htons(AFS_FS_PORT); in afs_fs_fetch_file_status() 472 call->port = htons(AFS_FS_PORT); in afs_fs_fetch_data64() 517 call->port = htons(AFS_FS_PORT); in afs_fs_fetch_data() 585 call->port = htons(AFS_FS_PORT); in afs_fs_give_up_callbacks() 691 call->port = htons(AFS_FS_PORT); in afs_fs_create() 780 call->port = htons(AFS_FS_PORT); in afs_fs_remove() 865 call->port = htons(AFS_FS_PORT); in afs_fs_link() 962 call->port = htons(AFS_FS_PORT); in afs_fs_symlink() 1070 call->port = htons(AFS_FS_PORT); in afs_fs_rename() 1179 call->port = htons(AFS_FS_PORT); in afs_fs_store_data64() [all …]
|
D | vlclient.c | 173 call->port = htons(AFS_VL_PORT); in afs_vl_get_entry_by_name() 209 call->port = htons(AFS_VL_PORT); in afs_vl_get_entry_by_id()
|
/linux-4.4.14/net/hsr/ |
D | hsr_main.h | 83 ht->path_and_LSDU_size = htons( in set_hsr_tag_path() 89 ht->path_and_LSDU_size = htons( in set_hsr_tag_LSDU_size()
|
D | hsr_forward.c | 132 hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr); in hsr_fill_tag() 134 hsr_ethhdr->ethhdr.h_proto = htons(ETH_P_PRP); in hsr_fill_tag() 318 if (ethhdr->h_proto == htons(ETH_P_8021Q)) { in hsr_fill_frame_info() 323 if (ethhdr->h_proto == htons(ETH_P_PRP)) { in hsr_fill_frame_info()
|
/linux-4.4.14/tools/testing/selftests/net/ |
D | psock_lib.h | 84 saddr.sin_port = htons(port); in pair_udp_open() 89 daddr.sin_port = htons(port + 1); in pair_udp_open()
|
D | psock_tpacket.c | 113 int ret, sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in pfsocket() 146 if (eth->h_proto != htons(ETH_P_IP)) { in test_payload() 166 eth->h_proto = htons(ETH_P_IP); in create_payload() 176 ip->tot_len = htons((uint16_t) *len - sizeof(*eth)); in create_payload() 367 rcv_sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in walk_v1_v2_tx() 689 ring->ll.sll_protocol = htons(ETH_P_ALL); in bind_ring()
|
/linux-4.4.14/include/linux/byteorder/ |
D | generic.h | 131 #undef htons 140 #define htons(x) ___htons(x) macro
|
/linux-4.4.14/net/rds/ |
D | tcp_connect.c | 91 src.sin_port = (__force u16)htons(0); in rds_tcp_conn_connect() 102 dest.sin_port = (__force u16)htons(RDS_TCP_PORT); in rds_tcp_conn_connect()
|
/linux-4.4.14/drivers/net/ethernet/fujitsu/ |
D | fmvj18x_cs.c | 779 htons(inw(ioaddr + TX_STATUS)), in fjn_tx_timeout() 784 htons(inw(ioaddr + 0)), htons(inw(ioaddr + 2)), in fjn_tx_timeout() 785 htons(inw(ioaddr + 4)), htons(inw(ioaddr + 6)), in fjn_tx_timeout() 786 htons(inw(ioaddr + 8)), htons(inw(ioaddr + 10)), in fjn_tx_timeout() 787 htons(inw(ioaddr + 12)), htons(inw(ioaddr + 14))); in fjn_tx_timeout()
|
/linux-4.4.14/net/802/ |
D | fddi.c | 71 fddi->hdr.llc_snap.ethertype = htons(type); in fddi_header() 113 type = htons(ETH_P_802_2); in fddi_type_trans()
|
D | fc.c | 57 fcllc->ethertype = htons(type); in fc_header()
|
/linux-4.4.14/include/linux/can/ |
D | dev.h | 89 if (skb->protocol == htons(ETH_P_CAN)) { in can_dropped_invalid_skb() 93 } else if (skb->protocol == htons(ETH_P_CANFD)) { in can_dropped_invalid_skb()
|
/linux-4.4.14/include/linux/sunrpc/ |
D | addr.h | 38 ((struct sockaddr_in *)sap)->sin_port = htons(port); in rpc_set_port() 41 ((struct sockaddr_in6 *)sap)->sin6_port = htons(port); in rpc_set_port()
|
/linux-4.4.14/drivers/net/ipvlan/ |
D | ipvlan_core.c | 126 case htons(ETH_P_ARP): { in ipvlan_get_L3_hdr() 137 case htons(ETH_P_IP): { in ipvlan_get_L3_hdr() 155 case htons(ETH_P_IPV6): { in ipvlan_get_L3_hdr() 445 if (skb->protocol == htons(ETH_P_IPV6)) in ipvlan_process_outbound() 447 else if (skb->protocol == htons(ETH_P_IP)) in ipvlan_process_outbound() 461 if (skb->protocol == htons(ETH_P_PAUSE)) { in ipvlan_multicast_enqueue()
|
/linux-4.4.14/drivers/scsi/fcoe/ |
D | fcoe_ctlr.c | 407 sol->eth.h_proto = htons(ETH_P_FIP); in fcoe_ctlr_solicit() 410 sol->fip.fip_op = htons(FIP_OP_DISC); in fcoe_ctlr_solicit() 412 sol->fip.fip_dl_len = htons(sizeof(sol->desc) / FIP_BPW); in fcoe_ctlr_solicit() 413 sol->fip.fip_flags = htons(FIP_FL_FPMA); in fcoe_ctlr_solicit() 415 sol->fip.fip_flags |= htons(FIP_FL_SPMA); in fcoe_ctlr_solicit() 428 sol->desc.size.fd_size = htons(fcoe_size); in fcoe_ctlr_solicit() 431 skb->protocol = htons(ETH_P_FIP); in fcoe_ctlr_solicit() 563 kal->eth.h_proto = htons(ETH_P_FIP); in fcoe_ctlr_send_keep_alive() 566 kal->fip.fip_op = htons(FIP_OP_CTRL); in fcoe_ctlr_send_keep_alive() 568 kal->fip.fip_dl_len = htons((sizeof(kal->mac) + in fcoe_ctlr_send_keep_alive() [all …]
|
/linux-4.4.14/drivers/net/ethernet/intel/fm10k/ |
D | fm10k_main.c | 503 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid); in fm10k_process_skb_fields() 505 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), in fm10k_process_skb_fields() 687 #define FM10K_NVGRE_RESERVED0_FLAGS htons(0x9FFF) 688 #define NVGRE_TNI htons(0x2000) 701 if (vlan_get_protocol(skb) != htons(ETH_P_IP)) in fm10k_gre_is_nvgre() 724 skb->inner_protocol != htons(ETH_P_TEB)) in fm10k_tx_encap_offload() 728 case htons(ETH_P_IP): in fm10k_tx_encap_offload() 731 case htons(ETH_P_IPV6): in fm10k_tx_encap_offload() 753 case htons(ETH_P_IP): in fm10k_tx_encap_offload() 756 case htons(ETH_P_IPV6): in fm10k_tx_encap_offload() [all …]
|
/linux-4.4.14/net/ipx/ |
D | af_ipx.c | 660 skb->protocol = htons(ETH_P_IPX); in ipxitf_send() 925 case IPX_FRAME_ETHERII: rc = htons(ETH_P_IPX); break; in ipx_map_frame_type() 926 case IPX_FRAME_8022: rc = htons(ETH_P_802_2); break; in ipx_map_frame_type() 927 case IPX_FRAME_SNAP: rc = htons(ETH_P_SNAP); break; in ipx_map_frame_type() 928 case IPX_FRAME_8023: rc = htons(ETH_P_802_3); break; in ipx_map_frame_type() 968 dlink_type = htons(ETH_P_802_2); in ipxitf_create() 973 dlink_type = htons(ETH_P_IPX); in ipxitf_create() 979 dlink_type = htons(ETH_P_SNAP); in ipxitf_create() 983 dlink_type = htons(ETH_P_802_3); in ipxitf_create() 1214 __u32 sum = p[1] + (p[2] & (__force u16)htons(0x00ff)); in ipx_cksum() [all …]
|
D | ipx_route.c | 207 ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr)); in ipxrtr_route_packet() 240 intrfc->if_dlink_type == htons(IPX_FRAME_8023)) in ipxrtr_route_packet() 241 ipx->ipx_checksum = htons(0xFFFF); in ipxrtr_route_packet()
|
D | pe2.c | 15 skb->protocol = htons(ETH_P_IPX); in pEII_request()
|
/linux-4.4.14/arch/unicore32/include/asm/ |
D | checksum.h | 33 : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto)) in csum_tcpudp_nofold()
|
/linux-4.4.14/drivers/net/ppp/ |
D | pptp.c | 245 hdr->protocol = htons(PPTP_GRE_PROTO); in pptp_xmit() 246 hdr->call_id = htons(opt->dst_addr.call_id); in pptp_xmit() 256 hdr->payload_len = htons(len); in pptp_xmit() 270 iph->frag_off = htons(IP_DF); in pptp_xmit() 278 iph->tot_len = htons(skb->len); in pptp_xmit() 405 po = lookup_chan(htons(header->call_id), iph->saddr); in pptp_rcv()
|
/linux-4.4.14/drivers/staging/octeon/ |
D | ethernet-tx.c | 398 if ((skb->protocol == htons(ETH_P_IP)) && in cvm_oct_xmit() 402 (ip_hdr(skb)->frag_off == htons(1 << 14))) && in cvm_oct_xmit() 611 if (skb->protocol == htons(ETH_P_IP)) { in cvm_oct_xmit_pow() 664 work->word2.snoip.is_rarp = skb->protocol == htons(ETH_P_RARP); in cvm_oct_xmit_pow() 665 work->word2.snoip.is_arp = skb->protocol == htons(ETH_P_ARP); in cvm_oct_xmit_pow()
|
/linux-4.4.14/drivers/net/ethernet/brocade/bna/ |
D | bfa_msgq.c | 201 dbell->idx.cmdq_pi = htons(cmdq->producer_index); in bfa_msgq_cmdq_dbell() 294 rsp->mh.mtag.i2htok = htons(cmdq->token); in bfa_msgq_cmdq_copy_rsp() 459 dbell->idx.rspq_ci = htons(rspq->consumer_index); in bfa_msgq_rspq_dbell() 526 msgq_cfg->cmdq.q_depth = htons(msgq->cmdq.depth); in bfa_msgq_init() 528 msgq_cfg->rspq.q_depth = htons(msgq->rspq.depth); in bfa_msgq_init()
|
D | bna_tx_rx.c | 193 req->mh.num_entries = htons( in bna_bfi_ucast_req() 209 req->mh.num_entries = htons( in bna_bfi_mcast_add_req() 225 req->mh.num_entries = htons( in bna_bfi_mcast_del_req() 227 req->handle = htons(handle); in bna_bfi_mcast_del_req() 240 req->mh.num_entries = htons( in bna_bfi_mcast_filter_req() 255 req->mh.num_entries = htons( in bna_bfi_rx_promisc_req() 272 req->mh.num_entries = htons( in bna_bfi_rx_vlan_filter_set() 295 req->mh.num_entries = htons( in bna_bfi_vlan_strip_enable() 310 req->mh.num_entries = htons( in bna_bfi_rit_cfg() 312 req->size = htons(rxf->rit_size); in bna_bfi_rit_cfg() [all …]
|
/linux-4.4.14/net/atm/ |
D | br2684.c | 395 if (type == htons(ETH_P_IP) && in packet_fails_filter() 399 if (type == htons(ETH_P_ARP)) in packet_fails_filter() 458 skb->protocol = htons(ETH_P_IPV6); in br2684_push() 461 skb->protocol = htons(ETH_P_IP); in br2684_push() 486 skb->protocol = htons(ETH_P_IP); in br2684_push() 488 skb->protocol = htons(ETH_P_IPV6); in br2684_push()
|
/linux-4.4.14/arch/arc/include/asm/ |
D | checksum.h | 89 "r"(htons(proto)) in csum_tcpudp_nofold()
|
/linux-4.4.14/drivers/infiniband/hw/nes/ |
D | nes_cm.c | 467 skb->protocol = htons(0x800); in form_cm_frame() 473 ethh->h_proto = htons(0x0800); in form_cm_frame() 478 iph->tot_len = htons(packetsize); in form_cm_frame() 479 iph->id = htons(++cm_node->tcp_cntxt.loc_id); in form_cm_frame() 481 iph->frag_off = htons(0x4000); in form_cm_frame() 488 tcph->source = htons(cm_node->mapped_loc_port); in form_cm_frame() 489 tcph->dest = htons(cm_node->mapped_rem_port); in form_cm_frame() 516 tcph->window = htons(cm_node->tcp_cntxt.rcv_wnd); in form_cm_frame() 548 nes_create_sockaddr(htonl(cm_info->loc_addr), htons(cm_info->loc_port), in nes_create_mapinfo() 551 htons(cm_info->mapped_loc_port), &mapped_sockaddr); in nes_create_mapinfo() [all …]
|
/linux-4.4.14/drivers/atm/ |
D | atmtcp.c | 128 msg.hdr.vpi = htons(vpi); in atmtcp_v_open() 130 msg.hdr.vci = htons(vci); in atmtcp_v_open() 221 hdr->vpi = htons(vcc->vpi); in atmtcp_v_send() 222 hdr->vci = htons(vcc->vci); in atmtcp_v_send()
|
/linux-4.4.14/net/ax25/ |
D | ax25_in.c | 130 skb->protocol = htons(ETH_P_IP); in ax25_rx_iframe() 248 skb->protocol = htons(ETH_P_IP); in ax25_rcv() 258 skb->protocol = htons(ETH_P_ARP); in ax25_rcv()
|
/linux-4.4.14/net/ieee802154/6lowpan/ |
D | rx.c | 31 skb->protocol = htons(ETH_P_IPV6); in lowpan_give_skb_to_device() 319 .type = htons(ETH_P_IEEE802154),
|
/linux-4.4.14/drivers/net/wireless/mwifiex/ |
D | sta_rx.c | 47 if (arp->hdr.ar_op == htons(ARPOP_REPLY) || in mwifiex_discard_gratuitous_arp() 48 arp->hdr.ar_op == htons(ARPOP_REQUEST)) { in mwifiex_discard_gratuitous_arp()
|
/linux-4.4.14/net/xfrm/ |
D | xfrm_output.c | 238 if (skb->protocol == htons(ETH_P_IP)) in xfrm_local_error() 240 else if (skb->protocol == htons(ETH_P_IPV6)) in xfrm_local_error()
|
/linux-4.4.14/drivers/net/ |
D | vrf.c | 158 case htons(ETH_P_IP): in is_ip_rx_frame() 160 case htons(ETH_P_IPV6): in is_ip_rx_frame() 334 case htons(ETH_P_IP): in is_ip_tx_frame() 336 case htons(ETH_P_IPV6): in is_ip_tx_frame() 413 skb->protocol = htons(ETH_P_IPV6); in vrf_finish_output6() 563 skb->protocol = htons(ETH_P_IP); in vrf_output()
|
D | geneve.c | 320 if (unlikely(geneveh->proto_type != htons(ETH_P_TEB))) in geneve_udp_encap_recv() 325 htons(ETH_P_TEB))) in geneve_udp_encap_recv() 633 geneveh->proto_type = htons(ETH_P_TEB); in geneve_build_header() 666 skb_set_inner_protocol(skb, htons(ETH_P_TEB)); in geneve_build_skb() 702 skb_set_inner_protocol(skb, htons(ETH_P_TEB)); in geneve6_build_skb() 864 df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0; in geneve_xmit_skb() 1224 __be16 dst_port = htons(GENEVE_UDP_PORT); in geneve_newlink() 1358 0, 0, 0, htons(dst_port), true); in geneve_dev_create_fb()
|
/linux-4.4.14/drivers/net/appletalk/ |
D | ipddp.c | 152 ddp->deh_len_hops = htons(skb->len + (1<<10)); in ipddp_xmit() 176 skb->protocol = htons(ETH_P_ATALK); /* Protocol has changed */ in ipddp_xmit()
|
/linux-4.4.14/net/rxrpc/ |
D | ar-peer.c | 45 htons(7000), htons(7001), in rxrpc_assess_MTU_size()
|
/linux-4.4.14/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_io.c | 527 vh->h_vlan_proto = htons(ETH_P_8021Q); in qlcnic_tx_pkt() 528 vh->h_vlan_TCI = htons(vlan_tci); in qlcnic_tx_pkt() 1244 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid); in qlcnic_process_rcv() 1323 ipv6h->payload_len = htons(length); in qlcnic_process_lro() 1328 csum_replace2(&iph->check, iph->tot_len, htons(length)); in qlcnic_process_lro() 1329 iph->tot_len = htons(length); in qlcnic_process_lro() 1338 if (skb->protocol == htons(ETH_P_IPV6)) in qlcnic_process_lro() 1345 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid); in qlcnic_process_lro() 1770 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vid); in qlcnic_83xx_process_rcv() 1846 ipv6h->payload_len = htons(length); in qlcnic_83xx_process_lro() [all …]
|
/linux-4.4.14/drivers/staging/wlan-ng/ |
D | p80211conv.c | 153 e_snap->type = htons(proto); in skb_ether_to_p80211() 412 e_hdr->type = htons(payload_length); in skb_p80211_to_ether() 479 e_hdr->type = htons(payload_length); in skb_p80211_to_ether()
|
/linux-4.4.14/drivers/scsi/bnx2fc/ |
D | bnx2fc_els.c | 86 rrq.rrq_ox_id = htons(aborted_io_req->xid); in bnx2fc_send_rrq() 87 rrq.rrq_rx_id = htons(aborted_io_req->task->rxwr_txrd.var_ctx.rx_id); in bnx2fc_send_rrq() 599 rec.rec_ox_id = htons(orig_io_req->xid); in bnx2fc_send_rec() 600 rec.rec_rx_id = htons(orig_io_req->task->rxwr_txrd.var_ctx.rx_id); in bnx2fc_send_rec() 639 srr.srr_ox_id = htons(orig_io_req->xid); in bnx2fc_send_srr() 640 srr.srr_rx_id = htons(orig_io_req->task->rxwr_txrd.var_ctx.rx_id); in bnx2fc_send_srr()
|
/linux-4.4.14/net/sunrpc/ |
D | addr.c | 348 ((struct sockaddr_in *)sap)->sin_port = htons(port); in rpc_uaddr2sockaddr() 351 ((struct sockaddr_in6 *)sap)->sin6_port = htons(port); in rpc_uaddr2sockaddr()
|
/linux-4.4.14/net/mac802154/ |
D | rx.c | 35 skb->protocol = htons(ETH_P_IEEE802154); in ieee802154_deliver_skb() 233 skb->protocol = htons(ETH_P_IEEE802154); in ieee802154_monitors_rx()
|
/linux-4.4.14/drivers/infiniband/ulp/ipoib/ |
D | ipoib_main.c | 962 if ((header->proto != htons(ETH_P_IP)) && in ipoib_start_xmit() 963 (header->proto != htons(ETH_P_IPV6)) && in ipoib_start_xmit() 964 (header->proto != htons(ETH_P_ARP)) && in ipoib_start_xmit() 965 (header->proto != htons(ETH_P_RARP)) && in ipoib_start_xmit() 966 (header->proto != htons(ETH_P_TIPC))) { in ipoib_start_xmit() 985 case htons(ETH_P_IP): in ipoib_start_xmit() 986 case htons(ETH_P_IPV6): in ipoib_start_xmit() 987 case htons(ETH_P_TIPC): in ipoib_start_xmit() 994 case htons(ETH_P_ARP): in ipoib_start_xmit() 995 case htons(ETH_P_RARP): in ipoib_start_xmit() [all …]
|
/linux-4.4.14/drivers/net/ethernet/intel/i40e/ |
D | i40e_fcoe.c | 237 if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q)) in i40e_fcoe_fc_frame_header() 1292 if (skb->protocol == htons(ETH_P_FCOE)) { in i40e_fcoe_tx_map() 1325 if (protocol == htons(ETH_P_8021Q)) { in i40e_fcoe_set_skb_header() 1333 if ((protocol != htons(ETH_P_FIP)) && in i40e_fcoe_set_skb_header() 1334 (protocol != htons(ETH_P_FCOE))) in i40e_fcoe_set_skb_header() 1339 if (protocol == htons(ETH_P_FIP)) in i40e_fcoe_set_skb_header() 1381 if (skb->protocol == htons(ETH_P_FIP)) in i40e_fcoe_xmit_frame()
|
/linux-4.4.14/arch/m32r/include/asm/ |
D | flat.h | 91 return htons(*(unsigned short *)rp) & 0xFFFF; in m32r_flat_get_addr_from_rp()
|
/linux-4.4.14/arch/um/drivers/ |
D | slip_kern.c | 44 return htons(ETH_P_IP); in slip_protocol()
|
D | slirp_kern.c | 49 return htons(ETH_P_IP); in slirp_protocol()
|
/linux-4.4.14/drivers/net/hyperv/ |
D | netvsc_drv.c | 243 !(flow.basic.n_proto == htons(ETH_P_IP) || in netvsc_set_hash() 244 flow.basic.n_proto == htons(ETH_P_IPV6))) in netvsc_set_hash() 392 if ((eth_hdr(skb)->h_proto != htons(ETH_P_IP)) && in get_net_transport_info() 393 (eth_hdr(skb)->h_proto != htons(ETH_P_IPV6))) { in get_net_transport_info() 399 if ((eth_hdr(skb)->h_proto == htons(ETH_P_IP))) { in get_net_transport_info() 732 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), in netvsc_recv_callback()
|
/linux-4.4.14/net/l2tp/ |
D | l2tp_core.c | 992 *bufp++ = htons(flags); in l2tp_build_l2tpv2_header() 993 *bufp++ = htons(tunnel_id); in l2tp_build_l2tpv2_header() 994 *bufp++ = htons(session_id); in l2tp_build_l2tpv2_header() 996 *bufp++ = htons(session->ns); in l2tp_build_l2tpv2_header() 1018 *((__be16 *) bufp) = htons(flags); in l2tp_build_l2tpv3_header() 1157 uh->len = htons(udp_len); in l2tp_xmit_skb() 1391 udp_conf.local_udp_port = htons(cfg->local_udp_port); in l2tp_tunnel_sock_create() 1392 udp_conf.peer_udp_port = htons(cfg->peer_udp_port); in l2tp_tunnel_sock_create()
|
/linux-4.4.14/drivers/staging/wilc1000/ |
D | linux_mon.c | 136 skb->protocol = htons(ETH_P_802_2); in WILC_WFI_monitor_rx() 275 skb2->protocol = htons(ETH_P_802_2); in WILC_WFI_mon_xmit()
|
/linux-4.4.14/drivers/scsi/libfc/ |
D | fc_exch.c | 308 fh->fh_ox_id = htons(ep->oxid); in fc_exch_setup_hdr() 309 fh->fh_rx_id = htons(ep->rxid); in fc_exch_setup_hdr() 311 fh->fh_seq_cnt = htons(ep->seq.cnt); in fc_exch_setup_hdr() 1044 fh->fh_rx_id = htons(FC_XID_UNKNOWN); in fc_seq_lookup_recip() 1398 ap->ba_high_seq_cnt = htons(0xffff); in fc_exch_recv_abts() 1403 ap->ba_low_seq_cnt = htons(sp->cnt); in fc_exch_recv_abts() 1485 if (fh->fh_rx_id == htons(FC_XID_UNKNOWN)) in fc_exch_recv_req() 1986 acc->reca_rx_id = htons(ep->rxid); in fc_exch_els_rec() 2156 rrq->rrq_ox_id = htons(ep->oxid); in fc_exch_rrq() 2157 rrq->rrq_rx_id = htons(ep->rxid); in fc_exch_rrq()
|
/linux-4.4.14/drivers/infiniband/hw/cxgb4/ |
D | cm.c | 891 mpa->private_data_size = htons(ep->plen); in send_mpa_req() 899 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_req() 903 mpa_v2_params.ird = htons((u16)ep->ird); in send_mpa_req() 904 mpa_v2_params.ord = htons((u16)ep->ord); in send_mpa_req() 907 mpa_v2_params.ird |= htons(MPA_V2_PEER2PEER_MODEL); in send_mpa_req() 910 htons(MPA_V2_RDMA_WRITE_RTR); in send_mpa_req() 913 htons(MPA_V2_RDMA_READ_RTR); in send_mpa_req() 985 mpa->private_data_size = htons(plen); in send_mpa_reject() 989 mpa->private_data_size = htons(ntohs(mpa->private_data_size) + in send_mpa_reject() 991 mpa_v2_params.ird = htons(((u16)ep->ird) | in send_mpa_reject() [all …]
|
/linux-4.4.14/drivers/scsi/qla2xxx/ |
D | qla_dbg.c | 465 *buf++ = htons(RD_REG_WORD(dmp_reg++)); in qla2xxx_read_window() 720 fw->hccr = htons(RD_REG_WORD(®->hccr)); in qla2300_fw_dump() 741 fw->pbiu_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2300_fw_dump() 745 fw->risc_host_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2300_fw_dump() 749 fw->mailbox_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2300_fw_dump() 760 fw->risc_hdw_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2300_fw_dump() 890 fw->hccr = htons(RD_REG_WORD(®->hccr)); in qla2100_fw_dump() 904 fw->pbiu_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2100_fw_dump() 911 fw->mailbox_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2100_fw_dump() 916 fw->dma_reg[cnt] = htons(RD_REG_WORD(dmp_reg++)); in qla2100_fw_dump() [all …]
|
/linux-4.4.14/drivers/net/bonding/ |
D | bond_3ad.c | 726 lacpdu->actor_system_priority = htons(port->actor_system_priority); in __update_lacpdu_from_port() 728 lacpdu->actor_key = htons(port->actor_oper_port_key); in __update_lacpdu_from_port() 729 lacpdu->actor_port_priority = htons(port->actor_port_priority); in __update_lacpdu_from_port() 730 lacpdu->actor_port = htons(port->actor_port_number); in __update_lacpdu_from_port() 740 lacpdu->partner_system_priority = htons(partner->system_priority); in __update_lacpdu_from_port() 742 lacpdu->partner_key = htons(partner->key); in __update_lacpdu_from_port() 743 lacpdu->partner_port_priority = htons(partner->port_priority); in __update_lacpdu_from_port() 744 lacpdu->partner_port = htons(partner->port_number); in __update_lacpdu_from_port() 1755 .collector_max_delay = htons(AD_COLLECTOR_MAX_DELAY), in ad_initialize_port()
|
/linux-4.4.14/arch/x86/lib/ |
D | csum-wrappers_64.c | 142 rest = (__force __u64)htonl(len) + (__force __u64)htons(proto) + in csum_ipv6_magic()
|
/linux-4.4.14/drivers/media/dvb-core/ |
D | dvb_net.c | 166 return htons(ETH_P_802_3); in dvb_net_eth_type_trans() 171 return htons(ETH_P_802_2); in dvb_net_eth_type_trans() 576 __be16 ulen = htons(priv->ule_sndu_len); in dvb_net_ule() 577 __be16 utype = htons(priv->ule_sndu_type); in dvb_net_ule() 588 ulen |= htons(0x8000); in dvb_net_ule() 717 ethh->h_proto = htons(priv->ule_sndu_type); in dvb_net_ule()
|