Searched refs:htons (Results 1 - 25 of 963) sorted by relevance

1234567891011>>

/linux-master/include/net/
H A Dtun_proto.h20 return htons(ETH_P_IP);
22 return htons(ETH_P_IPV6);
24 return htons(ETH_P_TEB);
26 return htons(ETH_P_NSH);
28 return htons(ETH_P_MPLS_UC);
36 case htons(ETH_P_IP):
38 case htons(ETH_P_IPV6):
40 case htons(ETH_P_TEB):
42 case htons(ETH_P_NSH):
44 case htons(ETH_P_MPLS_U
[all...]
H A Dmpls.h21 return eth_type == htons(ETH_P_MPLS_UC) ||
22 eth_type == htons(ETH_P_MPLS_MC);
H A Dx25device.h16 return htons(ETH_P_X25);
H A Ddsfield.h39 iph->check = (__force __sum16)htons(check);
49 *p = (*p & htons((((u16)mask << 4) | 0xf00f))) | htons((u16)value << 4);
/linux-master/net/8021q/
H A Dvlan_mvrp.c28 .pkttype.type = htons(ETH_P_MVRP),
36 __be16 vlan_id = htons(vlan->vlan_id);
38 if (vlan->vlan_proto != htons(ETH_P_8021Q))
47 __be16 vlan_id = htons(vlan->vlan_id);
49 if (vlan->vlan_proto != htons(ETH_P_8021Q))
H A Dvlan_gvrp.c30 __be16 vlan_id = htons(vlan->vlan_id);
32 if (vlan->vlan_proto != htons(ETH_P_8021Q))
41 __be16 vlan_id = htons(vlan->vlan_id);
43 if (vlan->vlan_proto != htons(ETH_P_8021Q))
/linux-master/samples/bpf/
H A Dsock_example.h18 sock = socket(PF_PACKET, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, htons(ETH_P_ALL));
27 sll.sll_protocol = htons(ETH_P_ALL);
H A Dparse_simple.c39 if (eth->h_proto != htons(ETH_P_IP))
45 if (udp->dest == htons(DEFAULT_PKTGEN_UDP_PORT))
H A Dparse_varlen.c28 if (tcp->dest == htons(80) || tcp->source == htons(80))
39 if (udp->dest == htons(DEFAULT_PKTGEN_UDP_PORT) ||
40 udp->source == htons(DEFAULT_PKTGEN_UDP_PORT)) {
144 if (h_proto == htons(ETH_P_IP))
146 else if (h_proto == htons(ETH_P_IPV6))
H A Dtc_l2_redirect_kern.c50 if (eth_proto == htons(ETH_P_IP))
52 else if (eth_proto == htons(ETH_P_IPV6))
76 if (eth->h_proto == htons(ETH_P_IP)) {
89 } else if (eth->h_proto == htons(ETH_P_IPV6)) {
127 if (eth->h_proto == htons(ETH_P_IP)) {
166 if (eth->h_proto == htons(ETH_P_IP)) {
178 } else if (eth->h_proto == htons(ETH_P_IPV6)) {
216 if (eth->h_proto == htons(ETH_P_IP)) {
224 } else if (eth->h_proto == htons(ETH_P_IPV6)) {
H A Dxdp_fwd_kern.c38 check += (__force u32)htons(0x0100);
62 if (h_proto == htons(ETH_P_IP)) {
79 } else if (h_proto == htons(ETH_P_IPV6)) {
133 if (h_proto == htons(ETH_P_IP))
135 else if (h_proto == htons(ETH_P_IPV6))
/linux-master/drivers/infiniband/hw/irdma/
H A Dtrace.c13 trace_seq_printf(p, "%pI4:%d", &myaddr, htons(port));
15 trace_seq_printf(p, "%pI6:%d", addr, htons(port));
/linux-master/net/dsa/
H A Dtag_rzn1_a5psw.c64 ptag->ctrl_tag = htons(ETH_P_DSA_A5PSW);
65 ptag->ctrl_data = htons(A5PSW_CTRL_DATA_FORCE_FORWARD);
66 ptag->ctrl_data2_lo = htons(data2_val);
86 if (tag->ctrl_tag != htons(ETH_P_DSA_A5PSW)) {
H A Dtag_mtk.c39 case htons(ETH_P_8021Q):
42 case htons(ETH_P_8021AD):
/linux-master/net/core/
H A Dtso.c18 iph->id = htons(tso->ip_id);
19 iph->tot_len = htons(size + hdr_len - mac_hdr_len);
24 iph->payload_len = htons(size + tso->tlen);
41 uh->len = htons(sizeof(*uh) + size);
73 tso->ipv6 = vlan_get_protocol(skb) == htons(ETH_P_IPV6);
/linux-master/tools/testing/selftests/net/
H A Dtxring_overwrite.c51 eth->h_proto = htons(ETH_P_IP);
61 iph->tot_len = htons(blen - off);
66 udph->dest = htons(8000);
67 udph->source = htons(8001);
68 udph->len = htons(blen - off);
79 fdr = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP));
97 laddr.sll_protocol = htons(0);
H A Dip_defrag.c112 return htons(res);
129 return htons(res);
145 udphdr.source = htons(cfg_port + 1);
146 udphdr.dest = htons(cfg_port);
147 udphdr.len = htons(UDP_HLEN + payload_len);
162 fraghdr->ip6f_offlg = htons(offset);
165 fraghdr->ip6f_offlg = htons(offset | IP6_MF);
167 ip6hdr->ip6_plen = htons(frag_len);
180 iphdr->ip_off = htons(offset / 8);
183 iphdr->ip_off = htons(offse
[all...]
H A Dpsock_snd.c108 eth->h_proto = htons(ETH_P_8021Q);
109 tag[1] = htons(ETH_P_IP);
113 eth->h_proto = htons(ETH_P_IP);
124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len);
125 iph->id = htons(1337);
140 udph->source = htons(9);
141 udph->dest = htons(cfg_port);
142 udph->len = htons(len);
146 htons(IPPROTO_UDP) + udph->len);
175 laddr.sll_protocol = htons(ETH_P_I
[all...]
/linux-master/net/6lowpan/
H A Dnhc_udp.c54 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT);
58 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT);
63 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4));
64 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f));
91 uh.len = htons(lowpan_802154_cb(skb)->d_size -
94 uh.len = htons(skb->len + sizeof(struct udphdr));
97 uh.len = htons(skb->len + sizeof(struct udphdr));
/linux-master/lib/
H A Dtest_blackhole_dev.c51 uh->source = uh->dest = htons(UDP_PORT);
52 uh->len = htons(data_len);
66 skb->protocol = htons(ETH_P_IPV6);
/linux-master/net/netfilter/ipvs/
H A Dip_vs_proto_ah_esp.c46 &iph->saddr, htons(PORT_ISAKMP),
47 &iph->daddr, htons(PORT_ISAKMP), p);
50 &iph->daddr, htons(PORT_ISAKMP),
51 &iph->saddr, htons(PORT_ISAKMP), p);
/linux-master/net/netfilter/
H A Dnf_flow_table_inet.c19 case htons(ETH_P_8021Q):
23 case htons(ETH_P_PPP_SES):
33 case htons(ETH_P_IP):
35 case htons(ETH_P_IPV6):
/linux-master/drivers/net/ethernet/cisco/enic/
H A Dvnic_vic.c50 tlv->type = htons(type);
51 tlv->length = htons(length);
/linux-master/net/nsh/
H A Dnsh.c39 skb->protocol = htons(ETH_P_NSH);
104 skb->mac_len = proto == htons(ETH_P_TEB) ? ETH_HLEN : 0;
110 skb_gso_error_unwind(skb, htons(ETH_P_NSH), nsh_len,
116 skb->protocol = htons(ETH_P_NSH);
128 .type = htons(ETH_P_NSH),
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Den_accel.h64 case htons(ETH_P_IP):
67 case htons(ETH_P_IPV6):
81 swp_spec.tun_l3_proto = htons(ETH_P_IPV6);
84 swp_spec.tun_l3_proto = htons(ETH_P_IP);
106 udp_hdr(skb)->len = htons(payload_len);

Completed in 317 milliseconds

1234567891011>>