Home
last modified time | relevance | path

Searched refs:skb (Results 1 – 25 of 215) sorted by relevance

123456789

/include/linux/
Dskbuff.h436 void (*destructor)(struct sk_buff *skb);
517 static inline struct dst_entry *skb_dst(const struct sk_buff *skb) in skb_dst() argument
522 WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && in skb_dst()
525 return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); in skb_dst()
536 static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) in skb_dst_set() argument
538 skb->_skb_refdst = (unsigned long)dst; in skb_dst_set()
541 extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst);
547 static inline bool skb_dst_is_noref(const struct sk_buff *skb) in skb_dst_is_noref() argument
549 return (skb->_skb_refdst & SKB_DST_NOREF) && skb_dst(skb); in skb_dst_is_noref()
552 static inline struct rtable *skb_rtable(const struct sk_buff *skb) in skb_rtable() argument
[all …]
Dnetfilter_bridge.h50 extern int nf_bridge_copy_header(struct sk_buff *skb);
51 static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) in nf_bridge_maybe_copy_header() argument
53 if (skb->nf_bridge && in nf_bridge_maybe_copy_header()
54 skb->nf_bridge->mask & (BRNF_BRIDGED | BRNF_BRIDGED_DNAT)) in nf_bridge_maybe_copy_header()
55 return nf_bridge_copy_header(skb); in nf_bridge_maybe_copy_header()
59 static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) in nf_bridge_encap_header_len() argument
61 switch (skb->protocol) { in nf_bridge_encap_header_len()
71 static inline unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb) in nf_bridge_mtu_reduction() argument
73 if (unlikely(skb->nf_bridge->mask & BRNF_PPPoE)) in nf_bridge_mtu_reduction()
78 extern int br_handle_frame_finish(struct sk_buff *skb);
[all …]
Dif_vlan.h62 static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) in vlan_eth_hdr() argument
64 return (struct vlan_ethhdr *)skb_mac_header(skb); in vlan_eth_hdr()
96 extern bool vlan_do_receive(struct sk_buff **skb);
97 extern struct sk_buff *vlan_untag(struct sk_buff *skb);
125 static inline bool vlan_do_receive(struct sk_buff **skb) in vlan_do_receive() argument
130 static inline struct sk_buff *vlan_untag(struct sk_buff *skb) in vlan_untag() argument
132 return skb; in vlan_untag()
169 static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb, u16 vlan_tci) in vlan_insert_tag() argument
173 if (skb_cow_head(skb, VLAN_HLEN) < 0) { in vlan_insert_tag()
174 kfree_skb(skb); in vlan_insert_tag()
[all …]
Dnetpoll.h52 int __netpoll_rx(struct sk_buff *skb);
53 void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
55 static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) in netpoll_send_skb() argument
57 netpoll_send_skb_on_dev(np, skb, np->dev); in netpoll_send_skb()
63 static inline bool netpoll_rx(struct sk_buff *skb) in netpoll_rx() argument
70 npinfo = rcu_dereference_bh(skb->dev->npinfo); in netpoll_rx()
77 if (npinfo->rx_flags && __netpoll_rx(skb)) in netpoll_rx()
86 static inline int netpoll_rx_on(struct sk_buff *skb) in netpoll_rx_on() argument
88 struct netpoll_info *npinfo = rcu_dereference_bh(skb->dev->npinfo); in netpoll_rx_on()
93 static inline int netpoll_receive_skb(struct sk_buff *skb) in netpoll_receive_skb() argument
[all …]
Dnetfilter.h105 struct sk_buff *skb,
183 int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
195 struct sk_buff *skb, in nf_hook_thresh() argument
201 return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); in nf_hook_thresh()
205 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb, in nf_hook() argument
209 return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN); in nf_hook()
230 NF_HOOK_THRESH(uint8_t pf, unsigned int hook, struct sk_buff *skb, in NF_HOOK_THRESH() argument
234 int ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, thresh); in NF_HOOK_THRESH()
236 ret = okfn(skb); in NF_HOOK_THRESH()
241 NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb, in NF_HOOK_COND() argument
[all …]
Dhdlc.h39 __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev);
40 int (*netif_rx)(struct sk_buff *skb);
41 netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
54 netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
87 static __inline__ void debug_frame(const struct sk_buff *skb) in debug_frame() argument
91 for (i=0; i < skb->len; i++) { in debug_frame()
96 printk(" %02X", skb->data[i]); in debug_frame()
109 netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev);
116 static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, in hdlc_type_trans() argument
121 skb->dev = dev; in hdlc_type_trans()
[all …]
Dnetlink.h160 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) in nlmsg_hdr() argument
162 return (struct nlmsghdr *)skb->data; in nlmsg_hdr()
171 #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) argument
172 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds) argument
180 void (*input)(struct sk_buff *skb),
190 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
191 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
193 extern int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb,
195 int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
203 int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
[all …]
Drtnetlink.h623 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo);
624 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
625 extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid,
628 extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
629 extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst,
633 extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
635 #define RTA_PUT(skb, attrtype, attrlen, data) \ argument
636 ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
638 __rta_fill(skb, attrtype, attrlen, data); })
640 #define RTA_APPEND(skb, attrlen, data) \ argument
[all …]
/include/net/
Dllc_c_ev.h123 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 extern int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb);
132 extern int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb);
133 extern int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb);
134 extern int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb);
136 struct sk_buff *skb);
137 extern int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb);
[all …]
Dllc_c_ac.h90 typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb);
92 extern int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
93 extern int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
94 extern int llc_conn_ac_conn_confirm(struct sock* sk, struct sk_buff *skb);
95 extern int llc_conn_ac_data_ind(struct sock* sk, struct sk_buff *skb);
96 extern int llc_conn_ac_disc_ind(struct sock* sk, struct sk_buff *skb);
97 extern int llc_conn_ac_rst_ind(struct sock* sk, struct sk_buff *skb);
98 extern int llc_conn_ac_rst_confirm(struct sock* sk, struct sk_buff *skb);
100 struct sk_buff *skb);
102 struct sk_buff *skb);
[all …]
Dudplite.h20 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 …]
Dnetlink.h228 extern int netlink_rcv_skb(struct sk_buff *skb,
231 extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb,
250 extern struct nlattr * __nla_reserve(struct sk_buff *skb, int attrtype,
252 extern void * __nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
253 extern struct nlattr * nla_reserve(struct sk_buff *skb, int attrtype,
255 extern void * nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
256 extern void __nla_put(struct sk_buff *skb, int attrtype,
258 extern void __nla_put_nohdr(struct sk_buff *skb, int attrlen,
260 extern int nla_put(struct sk_buff *skb, int attrtype,
262 extern int nla_put_nohdr(struct sk_buff *skb, int attrlen,
[all …]
Dllc_s_ev.h47 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 extern int llc_sap_ev_activation_req(struct llc_sap *sap, struct sk_buff *skb);
57 extern int llc_sap_ev_rx_ui(struct llc_sap *sap, struct sk_buff *skb);
58 extern int llc_sap_ev_unitdata_req(struct llc_sap *sap, struct sk_buff *skb);
59 extern int llc_sap_ev_xid_req(struct llc_sap *sap, struct sk_buff *skb);
60 extern int llc_sap_ev_rx_xid_c(struct llc_sap *sap, struct sk_buff *skb);
61 extern int llc_sap_ev_rx_xid_r(struct llc_sap *sap, struct sk_buff *skb);
62 extern int llc_sap_ev_test_req(struct llc_sap *sap, struct sk_buff *skb);
[all …]
Dllc_s_ac.h26 typedef int (*llc_sap_action_t)(struct llc_sap *sap, struct sk_buff *skb);
29 struct sk_buff *skb);
30 extern int llc_sap_action_send_ui(struct llc_sap *sap, struct sk_buff *skb);
31 extern int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb);
32 extern int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb);
33 extern int llc_sap_action_send_test_c(struct llc_sap *sap, struct sk_buff *skb);
34 extern int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb);
36 struct sk_buff *skb);
37 extern int llc_sap_action_xid_ind(struct llc_sap *sap, struct sk_buff *skb);
38 extern int llc_sap_action_test_ind(struct llc_sap *sap, struct sk_buff *skb);
Dllc_pdu.h204 static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) in llc_pdu_sn_hdr() argument
206 return (struct llc_pdu_sn *)skb_network_header(skb); in llc_pdu_sn_hdr()
216 static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) in llc_pdu_un_hdr() argument
218 return (struct llc_pdu_un *)skb_network_header(skb); in llc_pdu_un_hdr()
231 static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, in llc_pdu_header_init() argument
237 skb_push(skb, hlen); in llc_pdu_header_init()
238 skb_reset_network_header(skb); in llc_pdu_header_init()
239 pdu = llc_pdu_un_hdr(skb); in llc_pdu_header_init()
252 static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) in llc_pdu_decode_sa() argument
254 if (skb->protocol == htons(ETH_P_802_2)) in llc_pdu_decode_sa()
[all …]
Dprotocol.h37 int (*handler)(struct sk_buff *skb);
38 void (*err_handler)(struct sk_buff *skb, u32 info);
39 int (*gso_send_check)(struct sk_buff *skb);
40 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
43 struct sk_buff *skb);
44 int (*gro_complete)(struct sk_buff *skb);
51 int (*handler)(struct sk_buff *skb);
53 void (*err_handler)(struct sk_buff *skb,
58 int (*gso_send_check)(struct sk_buff *skb);
59 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
[all …]
Dsch_generic.h46 int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev);
62 int (*reshape_fail)(struct sk_buff *skb,
145 struct sk_buff *skb, struct tcmsg*);
199 struct sk_buff *skb, struct tcmsg*);
228 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) in qdisc_cb_private_validate() argument
232 BUILD_BUG_ON(sizeof(skb->cb) < offsetof(struct qdisc_skb_cb, data) + sz); in qdisc_cb_private_validate()
241 static inline struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb) in qdisc_skb_cb() argument
243 return (struct qdisc_skb_cb *)skb->cb; in qdisc_skb_cb()
365 extern void __qdisc_calculate_pkt_len(struct sk_buff *skb,
428 static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb) in qdisc_pkt_len() argument
[all …]
Dgenetlink.h52 struct sk_buff *skb,
55 struct sk_buff *skb,
113 int (*doit)(struct sk_buff *skb,
115 int (*dumpit)(struct sk_buff *skb,
131 extern void genl_notify(struct sk_buff *skb, struct net *net, u32 pid,
134 void *genlmsg_put(struct sk_buff *skb, u32 pid, u32 seq,
179 static inline void *genlmsg_put_reply(struct sk_buff *skb, in genlmsg_put_reply() argument
184 return genlmsg_put(skb, info->snd_pid, info->snd_seq, family, in genlmsg_put_reply()
193 static inline int genlmsg_end(struct sk_buff *skb, void *hdr) in genlmsg_end() argument
195 return nlmsg_end(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); in genlmsg_end()
[all …]
Ddn_route.h20 extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb);
99 static inline void dn_rt_send(struct sk_buff *skb) in dn_rt_send() argument
101 dev_queue_xmit(skb); in dn_rt_send()
104 static inline void dn_rt_finish_output(struct sk_buff *skb, char *dst, char *src) in dn_rt_finish_output() argument
106 struct net_device *dev = skb->dev; in dn_rt_finish_output()
111 if (dev_hard_header(skb, dev, ETH_P_DNA_RT, dst, src, skb->len) >= 0) in dn_rt_finish_output()
112 dn_rt_send(skb); in dn_rt_finish_output()
114 kfree_skb(skb); in dn_rt_finish_output()
Ddst.h289 static inline void skb_dst_drop(struct sk_buff *skb) in skb_dst_drop() argument
291 if (skb->_skb_refdst) { in skb_dst_drop()
292 refdst_drop(skb->_skb_refdst); in skb_dst_drop()
293 skb->_skb_refdst = 0UL; in skb_dst_drop()
310 static inline void skb_dst_force(struct sk_buff *skb) in skb_dst_force() argument
312 if (skb_dst_is_noref(skb)) { in skb_dst_force()
314 skb->_skb_refdst &= ~SKB_DST_NOREF; in skb_dst_force()
315 dst_clone(skb_dst(skb)); in skb_dst_force()
328 static inline void __skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) in __skb_tunnel_rx() argument
330 skb->dev = dev; in __skb_tunnel_rx()
[all …]
Dieee802154_netdev.h41 static inline struct ieee802154_mac_cb *mac_cb(struct sk_buff *skb) in mac_cb() argument
43 return (struct ieee802154_mac_cb *)skb->cb; in mac_cb()
52 static inline int mac_cb_is_ackreq(struct sk_buff *skb) in mac_cb_is_ackreq() argument
54 return mac_cb(skb)->flags & MAC_CB_FLAG_ACKREQ; in mac_cb_is_ackreq()
57 static inline int mac_cb_is_secen(struct sk_buff *skb) in mac_cb_is_secen() argument
59 return mac_cb(skb)->flags & MAC_CB_FLAG_SECEN; in mac_cb_is_secen()
62 static inline int mac_cb_is_intrapan(struct sk_buff *skb) in mac_cb_is_intrapan() argument
64 return mac_cb(skb)->flags & MAC_CB_FLAG_INTRAPAN; in mac_cb_is_intrapan()
67 static inline int mac_cb_type(struct sk_buff *skb) in mac_cb_type() argument
69 return mac_cb(skb)->flags & MAC_CB_FLAG_TYPEMASK; in mac_cb_type()
Dx25device.h9 static inline __be16 x25_type_trans(struct sk_buff *skb, struct net_device *dev) in x25_type_trans() argument
11 skb->dev = dev; in x25_type_trans()
12 skb_reset_mac_header(skb); in x25_type_trans()
13 skb->pkt_type = PACKET_HOST; in x25_type_trans()
/include/trace/events/
Dnet.h14 TP_PROTO(struct sk_buff *skb,
19 TP_ARGS(skb, rc, dev, skb_len),
29 __entry->skbaddr = skb;
41 TP_PROTO(struct sk_buff *skb),
43 TP_ARGS(skb),
48 __string( name, skb->dev->name )
52 __entry->skbaddr = skb;
53 __entry->len = skb->len;
54 __assign_str(name, skb->dev->name);
63 TP_PROTO(struct sk_buff *skb),
[all …]
Dskb.h2 #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/linux/netfilter/
Dnfnetlink_compat.h46 #define NFA_NEST(skb, type) \ argument
47 ({ struct nfattr *__start = (struct nfattr *)skb_tail_pointer(skb); \
48 NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
50 #define NFA_NEST_END(skb, start) \ argument
51 ({ (start)->nfa_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
52 (skb)->len; })
53 #define NFA_NEST_CANCEL(skb, start) \ argument
55 skb_trim(skb, (unsigned char *) (start) - (skb)->data); \

123456789