/Linux-v4.19/include/net/ |
D | tun_proto.h | 19 return htons(ETH_P_IP); in tun_p_to_eth_p() 21 return htons(ETH_P_IPV6); in tun_p_to_eth_p() 23 return htons(ETH_P_TEB); in tun_p_to_eth_p() 25 return htons(ETH_P_NSH); in tun_p_to_eth_p() 27 return htons(ETH_P_MPLS_UC); in tun_p_to_eth_p() 35 case htons(ETH_P_IP): in tun_p_from_eth_p() 37 case htons(ETH_P_IPV6): in tun_p_from_eth_p() 39 case htons(ETH_P_TEB): in tun_p_from_eth_p() 41 case htons(ETH_P_NSH): in tun_p_from_eth_p() 43 case htons(ETH_P_MPLS_UC): in tun_p_from_eth_p()
|
D | inet_ecn.h | 95 check += (__force u16)htons(0xFFFB) + (__force u16)htons(ecn); in IP_ECN_set_ce() 212 if (skb->protocol == htons(ETH_P_IP)) in IP_ECN_decapsulate() 214 else if (skb->protocol == htons(ETH_P_IPV6)) in IP_ECN_decapsulate() 227 if (skb->protocol == htons(ETH_P_IP)) in IP6_ECN_decapsulate() 229 else if (skb->protocol == htons(ETH_P_IPV6)) in IP6_ECN_decapsulate()
|
/Linux-v4.19/samples/bpf/ |
D | xdp1_kern.c | 60 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1() 69 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1() 79 if (h_proto == htons(ETH_P_IP)) in xdp_prog1() 81 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
|
D | xdp2_kern.c | 76 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1() 85 if (h_proto == htons(ETH_P_8021Q) || h_proto == htons(ETH_P_8021AD)) { in xdp_prog1() 95 if (h_proto == htons(ETH_P_IP)) in xdp_prog1() 97 else if (h_proto == htons(ETH_P_IPV6)) in xdp_prog1()
|
D | tc_l2_redirect_kern.c | 50 if (eth_proto == htons(ETH_P_IP)) in is_vip_addr() 52 else if (eth_proto == htons(ETH_P_IPV6)) in is_vip_addr() 76 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_forward() 89 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_iptun_ingress_forward() 127 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_iptun_ingress_redirect() 166 if (eth->h_proto == htons(ETH_P_IP)) { in _l2_to_ip6tun_ingress_redirect() 178 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _l2_to_ip6tun_ingress_redirect() 216 if (eth->h_proto == htons(ETH_P_IP)) { in _drop_non_tun_vip() 224 } else if (eth->h_proto == htons(ETH_P_IPV6)) { in _drop_non_tun_vip()
|
D | parse_varlen.c | 28 if (tcp->dest == htons(80) || tcp->source == htons(80)) in tcp() 39 if (udp->dest == htons(DEFAULT_PKTGEN_UDP_PORT) || in udp() 40 udp->source == htons(DEFAULT_PKTGEN_UDP_PORT)) { in udp() 144 if (h_proto == htons(ETH_P_IP)) in handle_ingress() 146 else if (h_proto == htons(ETH_P_IPV6)) in handle_ingress()
|
D | xdp_fwd_kern.c | 38 check += (__force u32)htons(0x0100); in ip_decrease_ttl() 62 if (h_proto == htons(ETH_P_IP)) { in xdp_fwd_flags() 79 } else if (h_proto == htons(ETH_P_IPV6)) { in xdp_fwd_flags() 113 if (h_proto == htons(ETH_P_IP)) in xdp_fwd_flags() 115 else if (h_proto == htons(ETH_P_IPV6)) in xdp_fwd_flags()
|
/Linux-v4.19/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()
|
/Linux-v4.19/tools/testing/selftests/net/ |
D | psock_snd.c | 108 eth->h_proto = htons(ETH_P_8021Q); in build_eth_header() 109 tag[1] = htons(ETH_P_IP); in build_eth_header() 113 eth->h_proto = htons(ETH_P_IP); in build_eth_header() 124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header() 125 iph->id = htons(1337); in build_ipv4_header() 140 udph->source = htons(9); in build_udp_header() 141 udph->dest = htons(cfg_port); in build_udp_header() 142 udph->len = htons(len); in build_udp_header() 146 htons(IPPROTO_UDP) + udph->len); in build_udp_header() 175 laddr.sll_protocol = htons(ETH_P_IP); in do_bind() [all …]
|
/Linux-v4.19/net/openvswitch/ |
D | flow.c | 70 #define TCP_FLAGS_BE16(tp) (*(__be16 *)&tcp_flag_word(tp) & htons(0x0FFF)) 283 if (frag_off & htons(~0x7)) in parse_ipv6hdr() 332 key_vh->tci = vh->tci | htons(VLAN_TAG_PRESENT); in parse_vlan_tag() 365 key->eth.vlan.tci = htons(skb->vlan_tci); in parse_vlan() 401 return htons(ETH_P_802_2); in parse_ethertype() 404 return htons(0); in parse_ethertype() 410 return htons(ETH_P_802_2); in parse_ethertype() 417 return htons(ETH_P_802_2); in parse_ethertype() 428 key->tp.src = htons(icmp->icmp6_type); in parse_icmpv6() 429 key->tp.dst = htons(icmp->icmp6_code); in parse_icmpv6() [all …]
|
D | flow_netlink.c | 191 if (match->key->eth.type == htons(ETH_P_ARP) in match_validate() 192 || match->key->eth.type == htons(ETH_P_RARP)) { in match_validate() 194 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 200 if (match->mask && (match->mask->key.eth.type == htons(0xffff))) in match_validate() 204 if (match->key->eth.type == htons(ETH_P_IP)) { in match_validate() 206 if (match->mask && match->mask->key.eth.type == htons(0xffff)) { in match_validate() 241 if (match->key->eth.type == htons(ETH_P_IPV6)) { in match_validate() 243 if (match->mask && match->mask->key.eth.type == htons(0xffff)) { in match_validate() 276 htons(NDISC_NEIGHBOUR_SOLICITATION) || in match_validate() 277 match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { in match_validate() [all …]
|
/Linux-v4.19/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()
|
/Linux-v4.19/net/bridge/ |
D | br_netfilter_hooks.c | 74 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) 77 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) 80 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) 86 else if (skb->protocol == htons(ETH_P_8021Q)) in vlan_proto() 93 (vlan_proto(skb) == htons(ETH_P_IP) && \ 97 (vlan_proto(skb) == htons(ETH_P_IPV6) && \ 101 (vlan_proto(skb) == htons(ETH_P_ARP) && \ 111 (skb->protocol == htons(ETH_P_PPP_SES) && \ 112 pppoe_proto(skb) == htons(PPP_IP) && \ 116 (skb->protocol == htons(ETH_P_PPP_SES) && \ [all …]
|
/Linux-v4.19/net/core/ |
D | flow_dissector.c | 316 if (arp->ar_hrd != htons(ARPHRD_ETHER) || in __skb_flow_dissect_arp() 317 arp->ar_pro != htons(ETH_P_IP) || in __skb_flow_dissect_arp() 320 (arp->ar_op != htons(ARPOP_REPLY) && in __skb_flow_dissect_arp() 321 arp->ar_op != htons(ARPOP_REQUEST))) in __skb_flow_dissect_arp() 415 if (*p_proto == htons(ETH_P_TEB)) { in __skb_flow_dissect_gre() 449 *p_proto = htons(ETH_P_IP); in __skb_flow_dissect_gre() 452 *p_proto = htons(ETH_P_IPV6); in __skb_flow_dissect_gre() 542 key_tcp->flags = (*(__be16 *) &tcp_flag_word(th) & htons(0x0FFF)); in __skb_flow_dissect_tcp() 676 case htons(ETH_P_IP): { in __skb_flow_dissect() 704 if (iph->frag_off & htons(IP_OFFSET)) { in __skb_flow_dissect() [all …]
|
/Linux-v4.19/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-v4.19/net/ipv4/ |
D | arp.c | 549 skb->protocol = htons(ETH_P_ARP); in arp_create() 573 arp->ar_hrd = htons(dev->type); in arp_create() 574 arp->ar_pro = htons(ETH_P_IP); in arp_create() 579 arp->ar_hrd = htons(ARPHRD_AX25); in arp_create() 580 arp->ar_pro = htons(AX25_P_IP); in arp_create() 585 arp->ar_hrd = htons(ARPHRD_NETROM); in arp_create() 586 arp->ar_pro = htons(AX25_P_IP); in arp_create() 593 arp->ar_hrd = htons(ARPHRD_ETHER); in arp_create() 594 arp->ar_pro = htons(ETH_P_IP); in arp_create() 601 arp->ar_op = htons(type); in arp_create() [all …]
|
/Linux-v4.19/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() 263 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))) { in nat_h245() 380 info->sig_port[!dir] = htons(nated_port); in nat_h245() [all …]
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ipsec_rxtx.c | 125 if (skb->protocol == htons(ETH_P_IP)) { in mlx5e_ipsec_remove_trailer() 126 ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len); in mlx5e_ipsec_remove_trailer() 129 ipv6hdr->payload_len = htons(ntohs(ipv6hdr->payload_len) - in mlx5e_ipsec_remove_trailer() 153 if (skb->protocol == htons(ETH_P_IPV6)) in mlx5e_ipsec_set_swp() 166 if (skb->protocol == htons(ETH_P_IPV6)) in mlx5e_ipsec_set_swp() 236 mdata->content.tx.seq = htons(ntohl(tcph->seq) & 0xFFFF); in mlx5e_ipsec_set_metadata() 273 (skb->protocol != htons(ETH_P_IP) && in mlx5e_ipsec_handle_tx_skb() 274 skb->protocol != htons(ETH_P_IPV6)))) { in mlx5e_ipsec_handle_tx_skb() 396 mlx5e_ipsec_inverse_table[1] = htons(0xFFFF); in mlx5e_ipsec_build_inverse_table() 399 mlx5e_ipsec_inverse_table[mss] = htons(mss_inv); in mlx5e_ipsec_build_inverse_table()
|
/Linux-v4.19/drivers/net/ethernet/qualcomm/rmnet/ |
D | rmnet_map_data.c | 212 offset = htons((__force u16)(skb_transport_header(skb) - in rmnet_map_ipv4_ul_csum_header() 224 *hdr = htons((__force u16)*hdr); in rmnet_map_ipv4_ul_csum_header() 253 offset = htons((__force u16)(skb_transport_header(skb) - in rmnet_map_ipv6_ul_csum_header() 262 *hdr = htons((__force u16)*hdr); in rmnet_map_ipv6_ul_csum_header() 287 map_header->pkt_len = htons(map_datalen); in rmnet_map_add_map_header() 303 map_header->pkt_len = htons(map_datalen + padding); in rmnet_map_add_map_header() 373 if (skb->protocol == htons(ETH_P_IP)) { in rmnet_map_checksum_downlink_packet() 375 } else if (skb->protocol == htons(ETH_P_IPV6)) { in rmnet_map_checksum_downlink_packet() 411 if (skb->protocol == htons(ETH_P_IP)) { in rmnet_map_checksum_uplink_packet() 414 } else if (skb->protocol == htons(ETH_P_IPV6)) { in rmnet_map_checksum_uplink_packet()
|
/Linux-v4.19/net/nsh/ |
D | nsh.c | 41 skb->protocol = htons(ETH_P_NSH); in nsh_push() 107 skb->mac_len = proto == htons(ETH_P_TEB) ? ETH_HLEN : 0; in nsh_gso_segment() 113 skb_gso_error_unwind(skb, htons(ETH_P_NSH), nsh_len, in nsh_gso_segment() 120 skb->protocol = htons(ETH_P_NSH); in nsh_gso_segment() 132 .type = htons(ETH_P_NSH),
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_selftest.c | 147 ethh->h_proto = htons(ETH_P_IP); in mlx5e_test_get_udp_skb() 150 udph->source = htons(9); in mlx5e_test_get_udp_skb() 151 udph->dest = htons(9); /* Discard Protocol */ in mlx5e_test_get_udp_skb() 152 udph->len = htons(datalen + sizeof(struct udphdr)); in mlx5e_test_get_udp_skb() 161 iph->tot_len = htons(iplen); in mlx5e_test_get_udp_skb() 181 skb->protocol = htons(ETH_P_IP); in mlx5e_test_get_udp_skb() 221 if (udph->dest != htons(9)) in mlx5e_test_loopback_validate() 259 lbtp->pt.type = htons(ETH_P_IP); in mlx5e_test_loopback_setup()
|
/Linux-v4.19/net/hsr/ |
D | hsr_forward.c | 66 if (!(ethHdr->h_proto == htons(ETH_P_PRP) in is_supervision_frame() 67 || ethHdr->h_proto == htons(ETH_P_HSR))) in is_supervision_frame() 71 if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */ in is_supervision_frame() 73 if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP)) in is_supervision_frame() 151 hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr); in hsr_fill_tag() 153 hsr_ethhdr->ethhdr.h_proto = htons(protoVersion ? in hsr_fill_tag() 333 if (ethhdr->h_proto == htons(ETH_P_8021Q)) { in hsr_fill_frame_info() 338 if (ethhdr->h_proto == htons(ETH_P_PRP) in hsr_fill_frame_info() 339 || ethhdr->h_proto == htons(ETH_P_HSR)) { in hsr_fill_frame_info()
|
/Linux-v4.19/include/uapi/linux/ |
D | tipc_config.h | 288 tlv->tlv_len = htons(len); in TLV_SET_LEN() 298 tlv->tlv_type = htons(type); in TLV_SET_TYPE() 308 tlv_ptr->tlv_type = htons(type); in TLV_SET() 309 tlv_ptr->tlv_len = htons(tlv_len); in TLV_SET() 406 tcm_hdr->tcm_type = htons(cmd); in TCM_SET() 407 tcm_hdr->tcm_flags = htons(flags); in TCM_SET()
|
/Linux-v4.19/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()
|