/include/linux/ |
D | skbuff.h | 529 void (*destructor)(struct sk_buff *skb); 672 static inline bool skb_pfmemalloc(const struct sk_buff *skb) in skb_pfmemalloc() argument 674 return unlikely(skb->pfmemalloc); in skb_pfmemalloc() 690 static inline struct dst_entry *skb_dst(const struct sk_buff *skb) in skb_dst() argument 695 WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && in skb_dst() 698 return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); in skb_dst() 709 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set() argument 711 skb->_skb_refdst = (unsigned long)dst; in skb_dst_set() 714 void __skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst, 727 static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set_noref() argument [all …]
|
D | netfilter_bridge.h | 27 static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) in nf_bridge_encap_header_len() argument 29 switch (skb->protocol) { in nf_bridge_encap_header_len() 39 static inline void nf_bridge_update_protocol(struct sk_buff *skb) in nf_bridge_update_protocol() argument 41 if (skb->nf_bridge->mask & BRNF_8021Q) in nf_bridge_update_protocol() 42 skb->protocol = htons(ETH_P_8021Q); in nf_bridge_update_protocol() 43 else if (skb->nf_bridge->mask & BRNF_PPPoE) in nf_bridge_update_protocol() 44 skb->protocol = htons(ETH_P_PPP_SES); in nf_bridge_update_protocol() 52 static inline int nf_bridge_copy_header(struct sk_buff *skb) in nf_bridge_copy_header() argument 57 nf_bridge_update_protocol(skb); in nf_bridge_copy_header() 58 header_size = ETH_HLEN + nf_bridge_encap_header_len(skb); in nf_bridge_copy_header() [all …]
|
D | if_vlan.h | 61 static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) in vlan_eth_hdr() argument 63 return (struct vlan_ethhdr *)skb_mac_header(skb); in vlan_eth_hdr() 189 extern bool vlan_do_receive(struct sk_buff **skb); 238 static inline bool vlan_do_receive(struct sk_buff **skb) in vlan_do_receive() argument 298 static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb, in vlan_insert_tag() argument 303 if (skb_cow_head(skb, VLAN_HLEN) < 0) { in vlan_insert_tag() 304 dev_kfree_skb_any(skb); in vlan_insert_tag() 307 veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN); in vlan_insert_tag() 310 memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); in vlan_insert_tag() 311 skb->mac_header -= VLAN_HLEN; in vlan_insert_tag() [all …]
|
D | netlink.h | 13 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) in nlmsg_hdr() argument 15 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); 71 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 portid, int nonblock); 72 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 portid, 74 extern int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, 76 int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data), 84 int netlink_attachskb(struct sock *sk, struct sk_buff *skb, [all …]
|
D | ip.h | 23 static inline struct iphdr *ip_hdr(const struct sk_buff *skb) in ip_hdr() argument 25 return (struct iphdr *)skb_network_header(skb); in ip_hdr() 28 static inline struct iphdr *inner_ip_hdr(const struct sk_buff *skb) in inner_ip_hdr() argument 30 return (struct iphdr *)skb_inner_network_header(skb); in inner_ip_hdr() 33 static inline struct iphdr *ipip_hdr(const struct sk_buff *skb) in ipip_hdr() argument 35 return (struct iphdr *)skb_transport_header(skb); in ipip_hdr()
|
D | dccp.h | 63 static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) in dccp_hdr() argument 65 return (struct dccp_hdr *)skb_transport_header(skb); in dccp_hdr() 68 static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) in dccp_zeroed_hdr() argument 70 skb_push(skb, headlen); in dccp_zeroed_hdr() 71 skb_reset_transport_header(skb); in dccp_zeroed_hdr() 72 return memset(skb_transport_header(skb), 0, headlen); in dccp_zeroed_hdr() 85 static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb) in dccp_basic_hdr_len() argument 87 const struct dccp_hdr *dh = dccp_hdr(skb); in dccp_basic_hdr_len() 103 static inline struct dccp_hdr_request *dccp_hdr_request(struct sk_buff *skb) in dccp_hdr_request() argument 105 return (struct dccp_hdr_request *)(skb_transport_header(skb) + in dccp_hdr_request() [all …]
|
D | netfilter.h | 48 struct sk_buff *skb, 121 int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb, 133 struct sk_buff *skb, in nf_hook_thresh() argument 139 return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); in nf_hook_thresh() 143 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb, in nf_hook() argument 147 return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN); in nf_hook() 168 NF_HOOK_THRESH(uint8_t pf, unsigned int hook, struct sk_buff *skb, in NF_HOOK_THRESH() argument 172 int ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, thresh); in NF_HOOK_THRESH() 174 ret = okfn(skb); in NF_HOOK_THRESH() 179 NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb, in NF_HOOK_COND() argument [all …]
|
D | hdlc.h | 29 __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); 30 int (*netif_rx)(struct sk_buff *skb); 31 netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); 44 netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); 77 static __inline__ void debug_frame(const struct sk_buff *skb) in debug_frame() argument 81 for (i=0; i < skb->len; i++) { in debug_frame() 86 printk(" %02X", skb->data[i]); in debug_frame() 99 netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev); 106 static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, in hdlc_type_trans() argument 111 skb->dev = dev; in hdlc_type_trans() [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 | 20 int len, int odd, struct sk_buff *skb) in udplite_getfrag() argument 35 static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) in udplite_checksum_init() argument 51 else if (cscov < 8 || cscov > skb->len) { in udplite_checksum_init() 56 cscov, skb->len); in udplite_checksum_init() 59 } else if (cscov < skb->len) { in udplite_checksum_init() 60 UDP_SKB_CB(skb)->partial_cov = 1; in udplite_checksum_init() 61 UDP_SKB_CB(skb)->cscov = cscov; in udplite_checksum_init() 62 if (skb->ip_summed == CHECKSUM_COMPLETE) in udplite_checksum_init() 63 skb->ip_summed = CHECKSUM_NONE; in udplite_checksum_init() 70 static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udplite_csum_outgoing() argument [all …]
|
D | ip6_checksum.h | 44 static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto) in ip6_compute_pseudo() argument 46 return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in ip6_compute_pseudo() 47 &ipv6_hdr(skb)->daddr, in ip6_compute_pseudo() 48 skb->len, proto, 0)); in ip6_compute_pseudo() 51 static inline __wsum ip6_gro_compute_pseudo(struct sk_buff *skb, int proto) in ip6_gro_compute_pseudo() argument 53 const struct ipv6hdr *iph = skb_gro_network_header(skb); in ip6_gro_compute_pseudo() 56 skb_gro_len(skb), proto, 0)); in ip6_gro_compute_pseudo() 67 static inline void __tcp_v6_send_check(struct sk_buff *skb, in __tcp_v6_send_check() argument 71 struct tcphdr *th = tcp_hdr(skb); in __tcp_v6_send_check() 73 if (skb->ip_summed == CHECKSUM_PARTIAL) { in __tcp_v6_send_check() [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 | 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 | netlink.h | 228 int netlink_rcv_skb(struct sk_buff *skb, 230 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid, 243 struct nlattr *__nla_reserve(struct sk_buff *skb, int attrtype, int attrlen); 244 void *__nla_reserve_nohdr(struct sk_buff *skb, int attrlen); 245 struct nlattr *nla_reserve(struct sk_buff *skb, int attrtype, int attrlen); 246 void *nla_reserve_nohdr(struct sk_buff *skb, int attrlen); 247 void __nla_put(struct sk_buff *skb, int attrtype, int attrlen, 249 void __nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data); 250 int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data); 251 int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data); [all …]
|
D | inet_ecn.h | 120 static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ce() argument 130 if (skb->ip_summed == CHECKSUM_COMPLETE) in IP6_ECN_set_ce() 131 skb->csum = csum_add(csum_sub(skb->csum, from), to); in IP6_ECN_set_ce() 146 static inline int INET_ECN_set_ce(struct sk_buff *skb) in INET_ECN_set_ce() argument 148 switch (skb->protocol) { in INET_ECN_set_ce() 150 if (skb_network_header(skb) + sizeof(struct iphdr) <= in INET_ECN_set_ce() 151 skb_tail_pointer(skb)) in INET_ECN_set_ce() 152 return IP_ECN_set_ce(ip_hdr(skb)); in INET_ECN_set_ce() 156 if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= in INET_ECN_set_ce() 157 skb_tail_pointer(skb)) in INET_ECN_set_ce() [all …]
|
D | llc_pdu.h | 203 static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) in llc_pdu_sn_hdr() argument 205 return (struct llc_pdu_sn *)skb_network_header(skb); in llc_pdu_sn_hdr() 215 static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) in llc_pdu_un_hdr() argument 217 return (struct llc_pdu_un *)skb_network_header(skb); in llc_pdu_un_hdr() 230 static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, in llc_pdu_header_init() argument 236 skb_push(skb, hlen); in llc_pdu_header_init() 237 skb_reset_network_header(skb); in llc_pdu_header_init() 238 pdu = llc_pdu_un_hdr(skb); in llc_pdu_header_init() 251 static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) in llc_pdu_decode_sa() argument 253 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_sa() [all …]
|
D | udp.h | 112 static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb) in __udp_lib_checksum_complete() argument 114 return (UDP_SKB_CB(skb)->cscov == skb->len ? in __udp_lib_checksum_complete() 115 __skb_checksum_complete(skb) : in __udp_lib_checksum_complete() 116 __skb_checksum_complete_head(skb, UDP_SKB_CB(skb)->cscov)); in __udp_lib_checksum_complete() 119 static inline int udp_lib_checksum_complete(struct sk_buff *skb) in udp_lib_checksum_complete() argument 121 return !skb_csum_unnecessary(skb) && in udp_lib_checksum_complete() 122 __udp_lib_checksum_complete(skb); in udp_lib_checksum_complete() 131 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing() argument 133 __wsum csum = csum_partial(skb_transport_header(skb), in udp_csum_outgoing() 135 skb_queue_walk(&sk->sk_write_queue, skb) { in udp_csum_outgoing() [all …]
|
D | dst.h | 48 int (*output)(struct sock *sk, struct sk_buff *skb); 285 static inline void skb_dst_drop(struct sk_buff *skb) in skb_dst_drop() argument 287 if (skb->_skb_refdst) { in skb_dst_drop() 288 refdst_drop(skb->_skb_refdst); in skb_dst_drop() 289 skb->_skb_refdst = 0UL; in skb_dst_drop() 306 static inline void skb_dst_force(struct sk_buff *skb) in skb_dst_force() argument 308 if (skb_dst_is_noref(skb)) { in skb_dst_force() 310 skb->_skb_refdst &= ~SKB_DST_NOREF; in skb_dst_force() 311 dst_clone(skb_dst(skb)); in skb_dst_force() 336 static inline void skb_dst_force_safe(struct sk_buff *skb) in skb_dst_force_safe() argument [all …]
|
D | codel.h | 95 static struct codel_skb_cb *get_codel_cb(const struct sk_buff *skb) in get_codel_cb() argument 97 qdisc_cb_private_validate(skb, sizeof(struct codel_skb_cb)); in get_codel_cb() 98 return (struct codel_skb_cb *)qdisc_skb_cb(skb)->data; in get_codel_cb() 101 static codel_time_t codel_get_enqueue_time(const struct sk_buff *skb) in codel_get_enqueue_time() argument 103 return get_codel_cb(skb)->enqueue_time; in codel_get_enqueue_time() 106 static void codel_set_enqueue_time(struct sk_buff *skb) in codel_set_enqueue_time() argument 108 get_codel_cb(skb)->enqueue_time = codel_get_time(); in codel_set_enqueue_time() 218 static bool codel_should_drop(const struct sk_buff *skb, in codel_should_drop() argument 227 if (!skb) { in codel_should_drop() 232 vars->ldelay = now - codel_get_enqueue_time(skb); in codel_should_drop() [all …]
|
D | ip.h | 54 static inline unsigned int ip_hdrlen(const struct sk_buff *skb) in ip_hdrlen() argument 56 return ip_hdr(skb)->ihl * 4; in ip_hdrlen() 69 #define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) argument 70 #define PKTINFO_SKB_CB(skb) ((struct in_pktinfo *)((skb)->cb)) argument 104 int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, 107 int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, 109 int ip_local_deliver(struct sk_buff *skb); 110 int ip_mr_input(struct sk_buff *skb); 111 int ip_output(struct sock *sk, struct sk_buff *skb); 112 int ip_mc_output(struct sock *sk, struct sk_buff *skb); [all …]
|
/include/linux/can/ |
D | skb.h | 37 static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) in can_skb_prv() argument 39 return (struct can_skb_priv *)(skb->head); in can_skb_prv() 42 static inline void can_skb_reserve(struct sk_buff *skb) in can_skb_reserve() argument 44 skb_reserve(skb, sizeof(struct can_skb_priv)); in can_skb_reserve() 47 static inline void can_skb_destructor(struct sk_buff *skb) in can_skb_destructor() argument 49 sock_put(skb->sk); in can_skb_destructor() 52 static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk) in can_skb_set_owner() argument 56 skb->destructor = can_skb_destructor; in can_skb_set_owner() 57 skb->sk = sk; in can_skb_set_owner() 64 static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb) in can_create_echo_skb() argument [all …]
|
/include/trace/events/ |
D | net.h | 15 TP_PROTO(const struct sk_buff *skb, const struct net_device *dev), 17 TP_ARGS(skb, dev), 41 __entry->queue_mapping = skb->queue_mapping; 42 __entry->skbaddr = skb; 43 __entry->vlan_tagged = vlan_tx_tag_present(skb); 44 __entry->vlan_proto = ntohs(skb->vlan_proto); 45 __entry->vlan_tci = vlan_tx_tag_get(skb); 46 __entry->protocol = ntohs(skb->protocol); 47 __entry->ip_summed = skb->ip_summed; 48 __entry->len = skb->len; [all …]
|
D | skb.h | 2 #define TRACE_SYSTEM skb 16 TP_PROTO(struct sk_buff *skb, void *location), 18 TP_ARGS(skb, location), 27 __entry->skbaddr = skb; 29 __entry->protocol = ntohs(skb->protocol); 38 TP_PROTO(struct sk_buff *skb), 40 TP_ARGS(skb), 47 __entry->skbaddr = skb; 55 TP_PROTO(const struct sk_buff *skb, int len), 57 TP_ARGS(skb, len), [all …]
|
/include/net/netfilter/ |
D | nf_nat_l3proto.h | 13 bool (*manip_pkt)(struct sk_buff *skb, 19 void (*csum_update)(struct sk_buff *skb, unsigned int iphdroff, 24 void (*csum_recalc)(struct sk_buff *skb, u8 proto, 28 void (*decode_session)(struct sk_buff *skb, 42 int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct, 46 unsigned int nf_nat_ipv4_in(const struct nf_hook_ops *ops, struct sk_buff *skb, 50 struct sk_buff *skb, 55 unsigned int nf_nat_ipv4_out(const struct nf_hook_ops *ops, struct sk_buff *skb, 59 struct sk_buff *skb, 65 struct sk_buff *skb, [all …]
|