Searched refs:htons (Results 1 – 25 of 32) sorted by relevance
12
20 return htons(ETH_P_IP); in tun_p_to_eth_p()22 return htons(ETH_P_IPV6); in tun_p_to_eth_p()24 return htons(ETH_P_TEB); in tun_p_to_eth_p()26 return htons(ETH_P_NSH); in tun_p_to_eth_p()28 return htons(ETH_P_MPLS_UC); in tun_p_to_eth_p()36 case htons(ETH_P_IP): in tun_p_from_eth_p()38 case htons(ETH_P_IPV6): in tun_p_from_eth_p()40 case htons(ETH_P_TEB): in tun_p_from_eth_p()42 case htons(ETH_P_NSH): in tun_p_from_eth_p()44 case htons(ETH_P_MPLS_UC): in tun_p_from_eth_p()
39 iph->check = (__force __sum16)htons(check); in ipv4_change_dsfield()49 *p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4); in ipv6_change_dsfield()
21 return eth_type == htons(ETH_P_MPLS_UC) || in eth_p_mpls()22 eth_type == htons(ETH_P_MPLS_MC); in eth_p_mpls()
97 check_add = (__force __be16)((__force u16)htons(0xFFFB) + in IP_ECN_set_ce()98 (__force u16)htons(ecn)); in IP_ECN_set_ce()110 iph->check = csum16_add(iph->check, htons(0x1)); in IP_ECN_set_ect1()292 case htons(ETH_P_IP): in IP_ECN_decapsulate()295 case htons(ETH_P_IPV6): in IP_ECN_decapsulate()311 case htons(ETH_P_IP): in IP6_ECN_decapsulate()314 case htons(ETH_P_IPV6): in IP6_ECN_decapsulate()
16 return htons(ETH_P_X25); in x25_type_trans()
287 = (nsh->ver_flags_ttl_len & ~htons(xmask)) | htons(xflag); in __nsh_set_xflag()
349 case htons(ETH_P_IPV6): in pskb_inet_may_pull()353 case htons(ETH_P_IP): in pskb_inet_may_pull()379 case htons(ETH_P_IPV6): in skb_vlan_inet_prepare()383 case htons(ETH_P_IP): in skb_vlan_inet_prepare()445 if (payload_protocol == htons(ETH_P_IP)) in ip_tunnel_get_dsfield()447 else if (payload_protocol == htons(ETH_P_IPV6)) in ip_tunnel_get_dsfield()458 if (payload_protocol == htons(ETH_P_IP)) in ip_tunnel_get_ttl()460 else if (payload_protocol == htons(ETH_P_IPV6)) in ip_tunnel_get_ttl()
59 #define GUE_FLAG_PRIV htons(1<<0) /* Private flags are in options */
197 if (eth->h_proto == htons(ETH_P_8021Q)) { in erspan_build_header()291 if (eth->h_proto == htons(ETH_P_8021Q)) { in erspan_build_header_v2()312 md2->sgt = htons(sgt); in erspan_build_header_v2()
79 udp_hdr(skb)->len = htons(pcslen); in udplite_csum()
367 case htons(ETH_P_IP): in vxlan_features_check()370 case htons(ETH_P_IPV6): in vxlan_features_check()379 skb->inner_protocol != htons(ETH_P_TEB) || in vxlan_features_check()598 gbp->policy_id = htons(md->gbp & VXLAN_GBP_ID_MASK); in vxlan_build_gbp_hdr()
124 if (offset < 0 || (frag_off & htons(IP6_OFFSET))) in ipv6frag_thdr_truncated()
403 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; in ip_is_fragment()415 check += (__force u32)htons(0x0100); in ip_decrease_ttl()556 iph->id = htons(val); in ip_select_ident_segs()559 if ((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) { in ip_select_ident_segs()
21 #define MACSEC_PORT_ES (htons(0x0001))
318 case htons(ETH_P_8021Q): in eth_type_vlan()319 case htons(ETH_P_8021AD): in eth_type_vlan()329 if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX) in vlan_hw_offload_capable()331 if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX) in vlan_hw_offload_capable()381 veth->h_vlan_TCI = htons(vlan_tci); in __vlan_insert_inner_tag()697 skb->protocol = htons(ETH_P_802_3); in vlan_set_encap_proto()702 skb->protocol = htons(ETH_P_802_2); in vlan_set_encap_proto()
57 iph->tot_len = len <= IP_MAX_MTU ? htons(len) : 0; in iph_set_totlen()
134 skb->protocol == htons(ETH_P_IP)) { in virtio_net_hdr_to_skb()135 skb->protocol = htons(ETH_P_IPV6); in virtio_net_hdr_to_skb()
112 return htons(ETH_P_HDLC); in hdlc_type_trans()
217 proto &= htons(0xFF00); in eth_proto_is_802_3()220 return (__force u16)proto >= (__force u16)htons(ETH_P_802_3_MIN); in eth_proto_is_802_3()
132 #undef htons141 #define htons(x) ___htons(x) macro
39 ((struct sockaddr_in *)sap)->sin_port = htons(port); in rpc_set_port()42 ((struct sockaddr_in6 *)sap)->sin6_port = htons(port); in rpc_set_port()
88 case htons(ETH_P_IP): in hash_bridge()94 case htons(ETH_P_IPV6): in hash_bridge()
345 case htons(PPP_IP): in __nf_flow_pppoe_proto()346 return htons(ETH_P_IP); in __nf_flow_pppoe_proto()347 case htons(PPP_IPV6): in __nf_flow_pppoe_proto()348 return htons(ETH_P_IPV6); in __nf_flow_pppoe_proto()
238 ib->ib.dlid = htons(ntohl(opa->opa.dlid)); in path_conv_opa_to_ib()239 ib->ib.slid = htons(ntohl(opa->opa.slid)); in path_conv_opa_to_ib()
153 } else if (group->proto == htons(ETH_P_IP)) {