/linux-master/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 67 niph->tot_len = htons(nskb->len); 91 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) 132 niph->tot_len = htons(nskb->len); 145 if (ip_hdr(oldskb)->frag_off & htons(IP_OFFSET)) 180 niph->frag_off = htons(IP_DF); 187 nskb->protocol = htons(ETH_P_IP); 300 niph->tot_len = htons(nskb->len); 323 if (iph->frag_off & htons(IP_OFFSET))
|
H A D | nf_nat_h323.c | 204 htons(ntohs(info->rtp_port[i][dir]) + 1); 223 rtp_exp->tuple.dst.u.udp.port = htons(nated_port); 227 htons(nated_port + 1); 253 htons((port & htons(1)) ? nated_port + 1 : 262 info->rtp_port[i][!dir] = htons(nated_port); 303 htons(nated_port)) < 0) { 346 htons(nated_port))) { 353 info->sig_port[!dir] = htons(nated_port); 425 htons(nated_por [all...] |
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
H A D | ipsec_rxtx.c | 65 if (skb->protocol == htons(ETH_P_IP)) { 66 ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len); 69 ipv6hdr->payload_len = htons(ntohs(ipv6hdr->payload_len) - 94 if (skb->protocol == htons(ETH_P_IPV6)) 237 (skb->protocol != htons(ETH_P_IP) && 238 skb->protocol != htons(ETH_P_IPV6)))) 284 (skb->protocol != htons(ETH_P_IP) && 285 skb->protocol != htons(ETH_P_IPV6)))) {
|
/linux-master/tools/testing/selftests/net/ |
H A D | reuseaddr_conflict.c | 33 .sin6_port = htons(PORT), 38 .sin_port = htons(PORT),
|
/linux-master/samples/bpf/ |
H A D | xdp_tx_iptunnel_kern.c | 127 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP)); 135 iph->tot_len = htons(payload_len + sizeof(*iph)); 199 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IPV6)); 204 ip6h->payload_len = htons(ntohs(payload_len) + sizeof(*ip6h)); 228 if (h_proto == htons(ETH_P_IP)) 230 else if (h_proto == htons(ETH_P_IPV6))
|
H A D | xdp_adjust_tail_kern.c | 98 icmp_hdr->un.frag.mtu = htons(max_pcktsz - sizeof(struct ethhdr)); 109 iph->tot_len = htons( 149 if (h_proto == htons(ETH_P_IP))
|
/linux-master/net/phonet/ |
H A D | pep-gprs.c | 42 return htons(0); 46 return htons(ETH_P_IP); 48 return htons(ETH_P_IPV6); 50 return htons(0); 184 case htons(ETH_P_IP): 185 case htons(ETH_P_IPV6):
|
/linux-master/net/hsr/ |
H A D | hsr_main.h | 64 htons((ntohs(ht->path_and_LSDU_size) & 0x0FFF) | (path << 12)); 69 ht->path_and_LSDU_size = htons((ntohs(ht->path_and_LSDU_size) & 150 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & 155 rct->lan_id_and_LSDU_size = htons((ntohs(rct->lan_id_and_LSDU_size) & 241 if (rct->PRP_suffix == htons(ETH_P_PRP)) 266 if (ethhdr->h_proto == htons(ETH_P_8021Q))
|
/linux-master/drivers/net/can/dev/ |
H A D | skb.c | 60 (skb->protocol != htons(ETH_P_CAN) && 61 skb->protocol != htons(ETH_P_CANFD) && 62 skb->protocol != htons(ETH_P_CANXL))) { 220 skb->protocol = htons(ETH_P_CAN); 243 skb->protocol = htons(ETH_P_CANFD); 270 skb->protocol = htons(ETH_P_CANXL);
|
/linux-master/net/ipv6/ |
H A D | seg6_iptunnel.c | 121 } else if (!do_flowlabel && skb->protocol == htons(ETH_P_IPV6)) { 157 if (skb->protocol == htons(ETH_P_IPV6)) { 194 hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); 246 if (skb->protocol == htons(ETH_P_IPV6)) { 313 hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); 366 hdr->payload_len = htons(skb->len - sizeof(struct ipv6hdr)); 384 if (skb->protocol != htons(ETH_P_IPV6)) 397 if (skb->protocol == htons(ETH_P_IPV6)) 399 else if (skb->protocol == htons(ETH_P_IP)) 414 skb->protocol = htons(ETH_P_IPV [all...] |
/linux-master/drivers/net/ethernet/qualcomm/rmnet/ |
H A D | rmnet_map_data.c | 192 ul_header->csum_start_offset = htons(skb_network_header_len(skb)); 193 ul_header->csum_info = htons(val); 227 ul_header->csum_start_offset = htons(skb_network_header_len(skb)); 228 ul_header->csum_info = htons(val); 261 if (skb->protocol == htons(ETH_P_IP)) { 267 skb->protocol == htons(ETH_P_IPV6)) { 313 map_header->pkt_len = htons(map_datalen); 329 map_header->pkt_len = htons(map_datalen + padding); 420 if (skb->protocol == htons(ETH_P_IP)) 423 if (IS_ENABLED(CONFIG_IPV6) && skb->protocol == htons(ETH_P_IPV [all...] |
/linux-master/drivers/infiniband/sw/rxe/ |
H A D | rxe_net.c | 222 udph->len = htons(skb->len); 245 iph->tot_len = htons(skb->len); 271 ip6h->payload_len = htons(skb->len); 276 ip6h->payload_len = htons(skb->len - sizeof(*ip6h)); 285 __be16 df = htons(IP_DF); 335 if (skb->protocol == htons(ETH_P_IP)) 337 else if (skb->protocol == htons(ETH_P_IPV6)) 369 if (skb->protocol == htons(ETH_P_IP)) { 371 } else if (skb->protocol == htons(ETH_P_IPV6)) { 397 if (skb->protocol == htons(ETH_P_I [all...] |
/linux-master/net/core/ |
H A D | flow_dissector.c | 572 if (arp->ar_hrd != htons(ARPHRD_ETHER) || 573 arp->ar_pro != htons(ETH_P_IP) || 576 (arp->ar_op != htons(ARPOP_REPLY) && 577 arp->ar_op != htons(ARPOP_REQUEST))) 695 if (*p_proto == htons(ETH_P_TEB)) { 729 *p_proto = htons(ETH_P_IP); 732 *p_proto = htons(ETH_P_IPV6); 823 key_tcp->flags = (*(__be16 *) &tcp_flag_word(th) & htons(0x0FFF)); 1051 proto == htons(ETH_P_XDSA))) { 1165 case htons(ETH_P_I function 1213 case htons(ETH_P_IPV6): { function 1263 case htons(ETH_P_8021AD): function 1325 case htons(ETH_P_PPP_SES): { function 1386 case htons(ETH_P_TIPC): { function 1417 case htons(ETH_P_FCOE): function 1439 case htons(ETH_P_1588): { function 1454 case htons(ETH_P_PRP): function [all...] |
/linux-master/net/ipv4/ |
H A D | arp.c | 568 skb->protocol = htons(ETH_P_ARP); 592 arp->ar_hrd = htons(dev->type); 593 arp->ar_pro = htons(ETH_P_IP); 598 arp->ar_hrd = htons(ARPHRD_AX25); 599 arp->ar_pro = htons(AX25_P_IP); 604 arp->ar_hrd = htons(ARPHRD_NETROM); 605 arp->ar_pro = htons(AX25_P_IP); 612 arp->ar_hrd = htons(ARPHRD_ETHER); 613 arp->ar_pro = htons(ETH_P_IP); 620 arp->ar_op = htons(typ [all...] |
/linux-master/net/bridge/netfilter/ |
H A D | ebt_log.c | 98 htons(ETH_P_IP)) { 115 htons(ETH_P_IPV6)) { 139 ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || 140 (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { 156 if (ah->ar_hrd == htons(1) &&
|
/linux-master/drivers/net/ethernet/netronome/nfp/abm/ |
H A D | cls.c | 68 case htons(ETH_P_IP): 71 case htons(ETH_P_IPV6): 182 tos_off = proto == htons(ETH_P_IP) ? 16 : 20; 244 if (cls_u32->common.protocol != htons(ETH_P_IP) && 245 cls_u32->common.protocol != htons(ETH_P_IPV6)) {
|
/linux-master/net/bridge/ |
H A D | br_netfilter_hooks.c | 71 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IP)) 74 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_IPV6)) 77 (!skb_vlan_tag_present(skb) && skb->protocol == htons(ETH_P_ARP)) 83 else if (skb->protocol == htons(ETH_P_8021Q)) 93 return vlan_proto(skb) == htons(ETH_P_IP) && brnet->filter_vlan_tagged; 101 return vlan_proto(skb) == htons(ETH_P_IPV6) && 109 return vlan_proto(skb) == htons(ETH_P_ARP) && brnet->filter_vlan_tagged; 122 return skb->protocol == htons(ETH_P_PPP_SES) && 123 pppoe_proto(skb) == htons(PPP_IP) && brnet->filter_pppoe_tagged; 131 return skb->protocol == htons(ETH_P_PPP_SE [all...] |
/linux-master/drivers/scsi/libfc/ |
H A D | fc_encode.h | 78 ct->hdr.ct_cmd = htons((u16) op); 763 csp->sp_bb_cred = htons(10); /* this gets set by gateway */ 764 csp->sp_bb_data = htons((u16) lport->mfs); 766 cp->cp_class = htons(FC_CPC_VALID | FC_CPC_SEQ); 767 csp->sp_features = htons(FC_SP_FT_CIRO); 768 csp->sp_tot_seq = htons(255); /* seq. we accept */ 769 csp->sp_rel_off = htons(0x1f); 772 cp->cp_rdfs = htons((u16) lport->mfs); 773 cp->cp_con_seq = htons(255); 794 sp->sp_bb_cred = htons(1 [all...] |
/linux-master/drivers/net/ethernet/sfc/falcon/ |
H A D | filter.h | 187 spec->ether_type = htons(ETH_P_IP); 212 spec->ether_type = htons(ETH_P_IP); 239 spec->outer_vid = htons(vid);
|
/linux-master/net/bluetooth/bnep/ |
H A D | netdev.c | 80 r->len = htons(ETH_ALEN * 2); 101 r->len = htons(skb->len - len); 142 if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF))
|
/linux-master/drivers/net/ethernet/sfc/siena/ |
H A D | filter.h | 213 spec->ether_type = htons(ETH_P_IP); 238 spec->ether_type = htons(ETH_P_IP); 265 spec->outer_vid = htons(vid);
|
/linux-master/net/x25/ |
H A D | x25_dev.c | 167 skb->protocol = htons(ETH_P_X25); 190 skb->protocol = htons(ETH_P_X25); 212 skb->protocol = htons(ETH_P_X25);
|
/linux-master/tools/testing/selftests/bpf/ |
H A D | xdp_features.c | 409 tlv->type = htons(CMD_ACK); 410 tlv->len = htons(sizeof(*tlv)); 425 tlv->type = htons(CMD_ACK); 426 tlv->len = htons(sizeof(*tlv)); 443 tlv->type = htons(CMD_ACK); 445 tlv->len = htons(n); 468 tlv->type = htons(CMD_ACK); 470 tlv->len = htons(n); 535 tlv->type = htons(cmd); 536 tlv->len = htons(sizeo [all...] |
/linux-master/tools/testing/selftests/net/tcp_ao/ |
H A D | self-connect.c | 44 tcp_addr_to_sockaddr_in(&addr, &local_addr, htons(port)); 129 addr.sin6_port = htons(port + 1); 131 addr.sin_port = htons(port + 1);
|
/linux-master/net/netfilter/ |
H A D | xt_TCPMSS.c | 134 htons(oldmss), htons(newmss), 180 htons(len), htons(len + TCPOLEN_MSS), true); 210 newlen = htons(ntohs(iph->tot_len) + ret); 240 newlen = htons(ntohs(oldlen) + ret);
|