• Home
  • Raw
  • Download

Lines Matching refs:skb

200 	struct sk_buff       *skb;	/* formatted skb ready to send */  member
208 struct sk_buff *skb; member
499 struct sk_buff *skb, bool *ack) in auditd_set() argument
517 nlh = nlmsg_hdr(skb); in auditd_set()
518 netlink_ack(skb, nlh, 0, NULL); in auditd_set()
541 static void kauditd_printk_skb(struct sk_buff *skb) in kauditd_printk_skb() argument
543 struct nlmsghdr *nlh = nlmsg_hdr(skb); in kauditd_printk_skb()
559 static void kauditd_rehold_skb(struct sk_buff *skb, __always_unused int error) in kauditd_rehold_skb() argument
562 skb_queue_tail(&audit_hold_queue, skb); in kauditd_rehold_skb()
578 static void kauditd_hold_skb(struct sk_buff *skb, int error) in kauditd_hold_skb() argument
582 kauditd_printk_skb(skb); in kauditd_hold_skb()
595 skb_queue_tail(&audit_retry_queue, skb); in kauditd_hold_skb()
605 skb_queue_tail(&audit_hold_queue, skb); in kauditd_hold_skb()
612 kfree_skb(skb); in kauditd_hold_skb()
625 static void kauditd_retry_skb(struct sk_buff *skb, __always_unused int error) in kauditd_retry_skb() argument
629 skb_queue_tail(&audit_retry_queue, skb); in kauditd_retry_skb()
634 kauditd_printk_skb(skb); in kauditd_retry_skb()
636 kfree_skb(skb); in kauditd_retry_skb()
653 struct sk_buff *skb; in auditd_reset() local
673 while ((skb = skb_dequeue(&audit_retry_queue))) in auditd_reset()
674 kauditd_hold_skb(skb, -ECONNREFUSED); in auditd_reset()
688 static int auditd_send_unicast_skb(struct sk_buff *skb) in auditd_send_unicast_skb() argument
707 kfree_skb(skb); in auditd_send_unicast_skb()
716 rc = netlink_unicast(sk, skb, portid, 0); in auditd_send_unicast_skb()
747 void (*skb_hook)(struct sk_buff *skb), in kauditd_send_queue() argument
748 void (*err_hook)(struct sk_buff *skb, int error)) in kauditd_send_queue() argument
751 struct sk_buff *skb = NULL; in kauditd_send_queue() local
759 while ((skb != skb_tail) && (skb = skb_dequeue(queue))) { in kauditd_send_queue()
762 (*skb_hook)(skb); in kauditd_send_queue()
767 (*err_hook)(skb, -ECONNREFUSED); in kauditd_send_queue()
773 skb_get(skb); in kauditd_send_queue()
774 rc = netlink_unicast(sk, skb, portid, 0); in kauditd_send_queue()
781 (*err_hook)(skb, rc); in kauditd_send_queue()
790 consume_skb(skb); in kauditd_send_queue()
807 static void kauditd_send_multicast_skb(struct sk_buff *skb) in kauditd_send_multicast_skb() argument
829 copy = skb_copy(skb, GFP_KERNEL); in kauditd_send_multicast_skb()
833 nlh->nlmsg_len = skb->len; in kauditd_send_multicast_skb()
922 struct sk_buff *skb; in audit_send_list_thread() local
929 while ((skb = __skb_dequeue(&dest->q)) != NULL) in audit_send_list_thread()
930 netlink_unicast(sk, skb, dest->portid, 0); in audit_send_list_thread()
941 struct sk_buff *skb; in audit_make_reply() local
947 skb = nlmsg_new(size, GFP_KERNEL); in audit_make_reply()
948 if (!skb) in audit_make_reply()
951 nlh = nlmsg_put(skb, 0, seq, t, size, flags); in audit_make_reply()
956 return skb; in audit_make_reply()
959 kfree_skb(skb); in audit_make_reply()
968 kfree_skb(reply->skb); in audit_free_reply()
983 netlink_unicast(audit_get_sk(reply->net), reply->skb, reply->portid, 0); in audit_send_reply_thread()
984 reply->skb = NULL; in audit_send_reply_thread()
1011 reply->skb = audit_make_reply(seq, type, done, multi, payload, size); in audit_send_reply()
1012 if (!reply->skb) in audit_send_reply()
1031 static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type) in audit_netlink_ok() argument
1071 if (!netlink_capable(skb, CAP_AUDIT_CONTROL)) in audit_netlink_ok()
1077 if (!netlink_capable(skb, CAP_AUDIT_WRITE)) in audit_netlink_ok()
1118 static int audit_get_feature(struct sk_buff *skb) in audit_get_feature() argument
1122 seq = nlmsg_hdr(skb)->nlmsg_seq; in audit_get_feature()
1124 audit_send_reply(skb, seq, AUDIT_GET_FEATURE, 0, 0, &af, sizeof(af)); in audit_get_feature()
1206 struct sk_buff *skb; in audit_replace() local
1209 skb = audit_make_reply(0, AUDIT_REPLACE, 0, 0, &pvnr, sizeof(pvnr)); in audit_replace()
1210 if (!skb) in audit_replace()
1212 return auditd_send_unicast_skb(skb); in audit_replace()
1215 static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in audit_receive_msg() argument
1228 err = audit_netlink_ok(skb, msg_type); in audit_receive_msg()
1252 audit_send_reply(skb, seq, AUDIT_GET, 0, 0, &s, sizeof(s)); in audit_receive_msg()
1308 NETLINK_CB(skb).portid, in audit_receive_msg()
1309 sock_net(NETLINK_CB(skb).sk), in audit_receive_msg()
1310 skb, ack); in audit_receive_msg()
1365 err = audit_get_feature(skb); in audit_receive_msg()
1428 err = audit_list_rules_send(skb, seq); in audit_receive_msg()
1494 audit_send_reply(skb, seq, AUDIT_SIGNAL_INFO, 0, 0, in audit_receive_msg()
1506 audit_send_reply(skb, seq, AUDIT_TTY_GET, 0, 0, &s, sizeof(s)); in audit_receive_msg()
1555 static void audit_receive(struct sk_buff *skb) in audit_receive() argument
1566 nlh = nlmsg_hdr(skb); in audit_receive()
1567 len = skb->len; in audit_receive()
1572 err = audit_receive_msg(skb, nlh, &ack); in audit_receive()
1577 netlink_ack(skb, nlh, err, NULL); in audit_receive()
1784 kfree_skb(ab->skb); in audit_buffer_free()
1797 ab->skb = nlmsg_new(AUDIT_BUFSIZ, gfp_mask); in audit_buffer_alloc()
1798 if (!ab->skb) in audit_buffer_alloc()
1800 if (!nlmsg_put(ab->skb, 0, 0, type, 0, 0)) in audit_buffer_alloc()
1941 struct sk_buff *skb = ab->skb; in audit_expand() local
1942 int oldtail = skb_tailroom(skb); in audit_expand()
1943 int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask); in audit_expand()
1944 int newtail = skb_tailroom(skb); in audit_expand()
1951 skb->truesize += newtail - oldtail; in audit_expand()
1965 struct sk_buff *skb; in audit_log_vformat() local
1971 BUG_ON(!ab->skb); in audit_log_vformat()
1972 skb = ab->skb; in audit_log_vformat()
1973 avail = skb_tailroom(skb); in audit_log_vformat()
1980 len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args); in audit_log_vformat()
1989 len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2); in audit_log_vformat()
1992 skb_put(skb, len); in audit_log_vformat()
2034 struct sk_buff *skb; in audit_log_n_hex() local
2039 BUG_ON(!ab->skb); in audit_log_n_hex()
2040 skb = ab->skb; in audit_log_n_hex()
2041 avail = skb_tailroom(skb); in audit_log_n_hex()
2051 ptr = skb_tail_pointer(skb); in audit_log_n_hex()
2055 skb_put(skb, len << 1); /* new string is twice the old string */ in audit_log_n_hex()
2067 struct sk_buff *skb; in audit_log_n_string() local
2072 BUG_ON(!ab->skb); in audit_log_n_string()
2073 skb = ab->skb; in audit_log_n_string()
2074 avail = skb_tailroom(skb); in audit_log_n_string()
2081 ptr = skb_tail_pointer(skb); in audit_log_n_string()
2087 skb_put(skb, slen + 2); /* don't include null terminator */ in audit_log_n_string()
2427 struct sk_buff *skb; in audit_log_end() local
2434 skb = ab->skb; in audit_log_end()
2435 ab->skb = NULL; in audit_log_end()
2439 nlh = nlmsg_hdr(skb); in audit_log_end()
2440 nlh->nlmsg_len = skb->len - NLMSG_HDRLEN; in audit_log_end()
2443 skb_queue_tail(&audit_queue, skb); in audit_log_end()