/include/linux/ |
D | skbuff.h | 505 int skb_zerocopy_iter_dgram(struct sk_buff *skb, struct msghdr *msg, int len); 506 int skb_zerocopy_iter_stream(struct sock *sk, struct sk_buff *skb, 733 void (*destructor)(struct sk_buff *skb); 933 static inline bool skb_pfmemalloc(const struct sk_buff *skb) in skb_pfmemalloc() argument 935 return unlikely(skb->pfmemalloc); in skb_pfmemalloc() 951 static inline struct dst_entry *skb_dst(const struct sk_buff *skb) in skb_dst() argument 956 WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && in skb_dst() 959 return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); in skb_dst() 970 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set() argument 972 skb->_skb_refdst = (unsigned long)dst; in skb_dst_set() [all …]
|
D | netfilter_bridge.h | 17 int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb); 19 static inline void br_drop_fake_rtable(struct sk_buff *skb) in br_drop_fake_rtable() argument 21 struct dst_entry *dst = skb_dst(skb); in br_drop_fake_rtable() 24 skb_dst_drop(skb); in br_drop_fake_rtable() 28 nf_bridge_info_get(const struct sk_buff *skb) in nf_bridge_info_get() argument 30 return skb_ext_find(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_info_get() 33 static inline bool nf_bridge_info_exists(const struct sk_buff *skb) in nf_bridge_info_exists() argument 35 return skb_ext_exist(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_info_exists() 38 static inline int nf_bridge_get_physinif(const struct sk_buff *skb) in nf_bridge_get_physinif() argument 40 const struct nf_bridge_info *nf_bridge = nf_bridge_info_get(skb); in nf_bridge_get_physinif() [all …]
|
D | if_vlan.h | 58 static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) in vlan_eth_hdr() argument 60 return (struct vlan_ethhdr *)skb_mac_header(skb); in vlan_eth_hdr() 213 extern bool vlan_do_receive(struct sk_buff **skb); 265 static inline bool vlan_do_receive(struct sk_buff **skb) in vlan_do_receive() argument 335 static inline int __vlan_insert_inner_tag(struct sk_buff *skb, in __vlan_insert_inner_tag() argument 341 if (skb_cow_head(skb, VLAN_HLEN) < 0) in __vlan_insert_inner_tag() 344 skb_push(skb, VLAN_HLEN); in __vlan_insert_inner_tag() 348 memmove(skb->data, skb->data + VLAN_HLEN, mac_len - ETH_TLEN); in __vlan_insert_inner_tag() 349 skb->mac_header -= VLAN_HLEN; in __vlan_insert_inner_tag() 351 veth = (struct vlan_ethhdr *)(skb->data + mac_len - ETH_HLEN); in __vlan_insert_inner_tag() [all …]
|
D | ip.h | 19 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) in ip_hdr() argument 21 return (struct iphdr *)skb_network_header(skb); in ip_hdr() 24 static inline struct iphdr *inner_ip_hdr(const struct sk_buff *skb) in inner_ip_hdr() argument 26 return (struct iphdr *)skb_inner_network_header(skb); in inner_ip_hdr() 29 static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) in ipip_hdr() argument 31 return (struct iphdr *)skb_transport_header(skb); in ipip_hdr() 34 static inline unsigned int ip_transport_len(const struct sk_buff *skb) in ip_transport_len() argument 36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); in ip_transport_len()
|
D | virtio_net.h | 25 static inline int virtio_net_hdr_set_proto(struct sk_buff *skb, in virtio_net_hdr_set_proto() argument 28 if (skb->protocol) in virtio_net_hdr_set_proto() 34 skb->protocol = cpu_to_be16(ETH_P_IP); in virtio_net_hdr_set_proto() 37 skb->protocol = cpu_to_be16(ETH_P_IPV6); in virtio_net_hdr_set_proto() 46 static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, in virtio_net_hdr_to_skb() argument 83 skb_reset_mac_header(skb); in virtio_net_hdr_to_skb() 90 if (!pskb_may_pull(skb, needed)) in virtio_net_hdr_to_skb() 93 if (!skb_partial_csum_set(skb, start, off)) in virtio_net_hdr_to_skb() 96 p_off = skb_transport_offset(skb) + thlen; in virtio_net_hdr_to_skb() 97 if (!pskb_may_pull(skb, p_off)) in virtio_net_hdr_to_skb() [all …]
|
D | if_ether.h | 22 static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) in eth_hdr() argument 24 return (struct ethhdr *)skb_mac_header(skb); in eth_hdr() 30 static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) in skb_eth_hdr() argument 32 return (struct ethhdr *)skb->data; in skb_eth_hdr() 35 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) in inner_eth_hdr() argument 37 return (struct ethhdr *)skb_inner_mac_header(skb); in inner_eth_hdr() 40 int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
|
D | netfilter_ingress.h | 9 static inline bool nf_hook_ingress_active(const struct sk_buff *skb) in nf_hook_ingress_active() argument 15 return rcu_access_pointer(skb->dev->nf_hooks_ingress); in nf_hook_ingress_active() 19 static inline int nf_hook_ingress(struct sk_buff *skb) in nf_hook_ingress() argument 21 struct nf_hook_entries *e = rcu_dereference(skb->dev->nf_hooks_ingress); in nf_hook_ingress() 32 NFPROTO_NETDEV, skb->dev, NULL, NULL, in nf_hook_ingress() 33 dev_net(skb->dev), NULL); in nf_hook_ingress() 34 ret = nf_hook_slow(skb, &state, e, 0); in nf_hook_ingress() 46 static inline int nf_hook_ingress_active(struct sk_buff *skb) in nf_hook_ingress_active() argument 51 static inline int nf_hook_ingress(struct sk_buff *skb) in nf_hook_ingress() argument
|
D | netlink.h | 14 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) in nlmsg_hdr() argument 16 return (struct nlmsghdr *)skb->data; in nlmsg_hdr() 33 #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) argument 34 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) argument 47 void (*input)(struct sk_buff *skb); 129 bool netlink_strict_get_check(struct sk_buff *skb); 131 int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); 132 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, 134 int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, 136 int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data), [all …]
|
/include/net/ |
D | llc_c_ev.h | 123 static __inline__ struct llc_conn_state_ev *llc_conn_ev(struct sk_buff *skb) in llc_conn_ev() argument 125 return (struct llc_conn_state_ev *)skb->cb; in llc_conn_ev() 128 typedef int (*llc_conn_ev_t)(struct sock *sk, struct sk_buff *skb); 129 typedef int (*llc_conn_ev_qfyr_t)(struct sock *sk, struct sk_buff *skb); 131 int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb); 132 int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb); 133 int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb); 134 int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb); 135 int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb); 136 int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb); [all …]
|
D | llc_c_ac.h | 90 typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb); 92 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb); 93 int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb); 94 int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb); 95 int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb); 96 int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb); 97 int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb); 98 int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb); 100 struct sk_buff *skb); 102 struct sk_buff *skb); [all …]
|
D | udplite.h | 21 int len, int odd, struct sk_buff *skb) in udplite_getfrag() argument 30 static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) in udplite_checksum_init() argument 46 else if (cscov < 8 || cscov > skb->len) { in udplite_checksum_init() 51 cscov, skb->len); in udplite_checksum_init() 54 } else if (cscov < skb->len) { in udplite_checksum_init() 55 UDP_SKB_CB(skb)->partial_cov = 1; in udplite_checksum_init() 56 UDP_SKB_CB(skb)->cscov = cscov; in udplite_checksum_init() 57 if (skb->ip_summed == CHECKSUM_COMPLETE) in udplite_checksum_init() 58 skb->ip_summed = CHECKSUM_NONE; in udplite_checksum_init() 59 skb->csum_valid = 0; in udplite_checksum_init() [all …]
|
D | ip6_checksum.h | 39 static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto) in ip6_compute_pseudo() argument 41 return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in ip6_compute_pseudo() 42 &ipv6_hdr(skb)->daddr, in ip6_compute_pseudo() 43 skb->len, proto, 0)); in ip6_compute_pseudo() 46 static inline __wsum ip6_gro_compute_pseudo(struct sk_buff *skb, int proto) in ip6_gro_compute_pseudo() argument 48 const struct ipv6hdr *iph = skb_gro_network_header(skb); in ip6_gro_compute_pseudo() 51 skb_gro_len(skb), proto, 0)); in ip6_gro_compute_pseudo() 62 static inline void __tcp_v6_send_check(struct sk_buff *skb, in __tcp_v6_send_check() argument 66 struct tcphdr *th = tcp_hdr(skb); in __tcp_v6_send_check() 68 if (skb->ip_summed == CHECKSUM_PARTIAL) { in __tcp_v6_send_check() [all …]
|
D | udp.h | 108 static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb) in __udp_lib_checksum_complete() argument 110 return (UDP_SKB_CB(skb)->cscov == skb->len ? in __udp_lib_checksum_complete() 111 __skb_checksum_complete(skb) : in __udp_lib_checksum_complete() 112 __skb_checksum_complete_head(skb, UDP_SKB_CB(skb)->cscov)); in __udp_lib_checksum_complete() 115 static inline int udp_lib_checksum_complete(struct sk_buff *skb) in udp_lib_checksum_complete() argument 117 return !skb_csum_unnecessary(skb) && in udp_lib_checksum_complete() 118 __udp_lib_checksum_complete(skb); in udp_lib_checksum_complete() 127 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing() argument 129 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing() 131 skb_queue_walk(&sk->sk_write_queue, skb) { in udp_csum_outgoing() [all …]
|
D | inet_ecn.h | 136 static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ce() argument 146 if (skb->ip_summed == CHECKSUM_COMPLETE) in IP6_ECN_set_ce() 147 skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), in IP6_ECN_set_ce() 152 static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ect1() argument 162 if (skb->ip_summed == CHECKSUM_COMPLETE) in IP6_ECN_set_ect1() 163 skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from), in IP6_ECN_set_ect1() 174 static inline int INET_ECN_set_ce(struct sk_buff *skb) in INET_ECN_set_ce() argument 176 switch (skb_protocol(skb, true)) { in INET_ECN_set_ce() 178 if (skb_network_header(skb) + sizeof(struct iphdr) <= in INET_ECN_set_ce() 179 skb_tail_pointer(skb)) in INET_ECN_set_ce() [all …]
|
D | llc_s_ev.h | 47 static __inline__ struct llc_sap_state_ev *llc_sap_ev(struct sk_buff *skb) in llc_sap_ev() argument 49 return (struct llc_sap_state_ev *)skb->cb; in llc_sap_ev() 54 typedef int (*llc_sap_ev_t)(struct llc_sap *sap, struct sk_buff *skb); 56 int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb); 57 int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb); 58 int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb); 59 int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb); 60 int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb); 61 int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb); 62 int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb); [all …]
|
D | llc_s_ac.h | 26 typedef int (*llc_sap_action_t)(struct llc_sap *sap, struct sk_buff *skb); 28 int llc_sap_action_unitdata_ind(struct llc_sap *sap, struct sk_buff *skb); 29 int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb); 30 int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb); 31 int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb); 32 int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb); 33 int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb); 34 int llc_sap_action_report_status(struct llc_sap *sap, struct sk_buff *skb); 35 int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb); 36 int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb);
|
D | l3mdev.h | 28 struct sk_buff *skb, u16 proto); 30 struct sock *sk, struct sk_buff *skb, 146 struct sk_buff *l3mdev_l3_rcv(struct sk_buff *skb, u16 proto) in l3mdev_l3_rcv() argument 150 if (netif_is_l3_slave(skb->dev)) in l3mdev_l3_rcv() 151 master = netdev_master_upper_dev_get_rcu(skb->dev); in l3mdev_l3_rcv() 152 else if (netif_is_l3_master(skb->dev) || in l3mdev_l3_rcv() 153 netif_has_l3_rx_handler(skb->dev)) in l3mdev_l3_rcv() 154 master = skb->dev; in l3mdev_l3_rcv() 157 skb = master->l3mdev_ops->l3mdev_l3_rcv(master, skb, proto); in l3mdev_l3_rcv() 159 return skb; in l3mdev_l3_rcv() [all …]
|
D | codel_qdisc.h | 58 static struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb) in get_codel_cb() argument 60 qdisc_cb_private_validate(skb, sizeof(struct codel_skb_cb)); in get_codel_cb() 61 return (struct codel_skb_cb *)qdisc_skb_cb(skb)->data; in get_codel_cb() 64 static codel_time_t codel_get_enqueue_time(const struct sk_buff *skb) in codel_get_enqueue_time() argument 66 return get_codel_cb(skb)->enqueue_time; in codel_get_enqueue_time() 69 static void codel_set_enqueue_time(struct sk_buff *skb) in codel_set_enqueue_time() argument 71 get_codel_cb(skb)->enqueue_time = codel_get_time(); in codel_set_enqueue_time()
|
D | llc_pdu.h | 206 static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) in llc_pdu_sn_hdr() argument 208 return (struct llc_pdu_sn *)skb_network_header(skb); in llc_pdu_sn_hdr() 218 static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) in llc_pdu_un_hdr() argument 220 return (struct llc_pdu_un *)skb_network_header(skb); in llc_pdu_un_hdr() 233 static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, in llc_pdu_header_init() argument 248 skb_push(skb, hlen); in llc_pdu_header_init() 249 skb_reset_network_header(skb); in llc_pdu_header_init() 250 pdu = llc_pdu_un_hdr(skb); in llc_pdu_header_init() 263 static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) in llc_pdu_decode_sa() argument 265 memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); in llc_pdu_decode_sa() [all …]
|
/include/trace/events/ |
D | net.h | 16 TP_PROTO(const struct sk_buff *skb, const struct net_device *dev), 18 TP_ARGS(skb, dev), 42 __entry->queue_mapping = skb->queue_mapping; 43 __entry->skbaddr = skb; 44 __entry->vlan_tagged = skb_vlan_tag_present(skb); 45 __entry->vlan_proto = ntohs(skb->vlan_proto); 46 __entry->vlan_tci = skb_vlan_tag_get(skb); 47 __entry->protocol = ntohs(skb->protocol); 48 __entry->ip_summed = skb->ip_summed; 49 __entry->len = skb->len; [all …]
|
D | skb.h | 3 #define TRACE_SYSTEM skb 17 TP_PROTO(struct sk_buff *skb, void *location), 19 TP_ARGS(skb, location), 28 __entry->skbaddr = skb; 30 __entry->protocol = ntohs(skb->protocol); 39 TP_PROTO(struct sk_buff *skb), 41 TP_ARGS(skb), 48 __entry->skbaddr = skb; 56 TP_PROTO(const struct sk_buff *skb, int len), 58 TP_ARGS(skb, len), [all …]
|
/include/linux/can/ |
D | skb.h | 40 static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) in can_skb_prv() argument 42 return (struct can_skb_priv *)(skb->head); in can_skb_prv() 45 static inline void can_skb_reserve(struct sk_buff *skb) in can_skb_reserve() argument 47 skb_reserve(skb, sizeof(struct can_skb_priv)); in can_skb_reserve() 50 static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) in can_skb_set_owner() argument 58 skb->destructor = sock_efree; in can_skb_set_owner() 59 skb->sk = sk; in can_skb_set_owner() 66 static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb) in can_create_echo_skb() argument 70 nskb = skb_clone(skb, GFP_ATOMIC); in can_create_echo_skb() 72 kfree_skb(skb); in can_create_echo_skb() [all …]
|
/include/net/netfilter/ |
D | br_netfilter.h | 9 static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) in nf_bridge_alloc() argument 12 struct nf_bridge_info *b = skb_ext_add(skb, SKB_EXT_BRIDGE_NF); in nf_bridge_alloc() 23 void nf_bridge_update_protocol(struct sk_buff *skb); 26 struct sk_buff *skb, struct net_device *indev, 31 unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb); 33 static inline void nf_bridge_push_encap_header(struct sk_buff *skb) in nf_bridge_push_encap_header() argument 35 unsigned int len = nf_bridge_encap_header_len(skb); in nf_bridge_push_encap_header() 37 skb_push(skb, len); in nf_bridge_push_encap_header() 38 skb->network_header -= len; in nf_bridge_push_encap_header() 41 int br_nf_pre_routing_finish_bridge(struct net *net, struct sock *sk, struct sk_buff *skb); [all …]
|
D | nf_tables_ipv6.h | 10 struct sk_buff *skb) in nft_set_pktinfo_ipv6() argument 16 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in nft_set_pktinfo_ipv6() 18 nft_set_pktinfo_unspec(pkt, skb); in nft_set_pktinfo_ipv6() 29 struct sk_buff *skb) in __nft_set_pktinfo_ipv6_validate() argument 39 ip6h = skb_header_pointer(skb, skb_network_offset(skb), sizeof(*ip6h), in __nft_set_pktinfo_ipv6_validate() 48 if (pkt_len + sizeof(*ip6h) > skb->len) in __nft_set_pktinfo_ipv6_validate() 51 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in __nft_set_pktinfo_ipv6_validate() 67 struct sk_buff *skb) in nft_set_pktinfo_ipv6_validate() argument 69 if (__nft_set_pktinfo_ipv6_validate(pkt, skb) < 0) in nft_set_pktinfo_ipv6_validate() 70 nft_set_pktinfo_unspec(pkt, skb); in nft_set_pktinfo_ipv6_validate()
|
D | nf_tables_ipv4.h | 9 struct sk_buff *skb) in nft_set_pktinfo_ipv4() argument 13 ip = ip_hdr(pkt->skb); in nft_set_pktinfo_ipv4() 16 pkt->xt.thoff = ip_hdrlen(pkt->skb); in nft_set_pktinfo_ipv4() 21 struct sk_buff *skb) in __nft_set_pktinfo_ipv4_validate() argument 26 iph = skb_header_pointer(skb, skb_network_offset(skb), sizeof(*iph), in __nft_set_pktinfo_ipv4_validate() 36 if (skb->len < len) in __nft_set_pktinfo_ipv4_validate() 50 struct sk_buff *skb) in nft_set_pktinfo_ipv4_validate() argument 52 if (__nft_set_pktinfo_ipv4_validate(pkt, skb) < 0) in nft_set_pktinfo_ipv4_validate() 53 nft_set_pktinfo_unspec(pkt, skb); in nft_set_pktinfo_ipv4_validate()
|