Lines Matching defs:skb
156 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
158 return (struct nlmsghdr *)skb->data;
162 struct ucred creds; /* Skb credentials */
167 #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb))
168 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
176 void (*input)(struct sk_buff *skb),
186 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
187 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
189 extern int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb,
191 int (*filter)(struct sock *dsk, struct sk_buff *skb, void *data),
199 int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
201 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
202 int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
205 * skb should fit one page. This choice is good for headerless malloc.
220 struct sk_buff *skb;
222 int (*dump)(struct sk_buff * skb,
236 __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
241 nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
252 #define NLMSG_NEW(skb, pid, seq, type, len, flags) \
253 ({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \
255 __nlmsg_put(skb, pid, seq, type, len, flags); })
257 #define NLMSG_PUT(skb, pid, seq, type, len) \
258 NLMSG_NEW(skb, pid, seq, type, len, 0)
260 extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
262 int (*dump)(struct sk_buff *skb, struct netlink_callback*),