diff options
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r-- | include/net/netlink.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h index d7b824be5422..9298218c07f9 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -84,7 +84,7 @@ | |||
84 | * nla_next(nla)-----------------------------' | 84 | * nla_next(nla)-----------------------------' |
85 | * | 85 | * |
86 | * Data Structures: | 86 | * Data Structures: |
87 | * struct nlattr netlink attribtue header | 87 | * struct nlattr netlink attribute header |
88 | * | 88 | * |
89 | * Attribute Construction: | 89 | * Attribute Construction: |
90 | * nla_reserve(skb, type, len) reserve room for an attribute | 90 | * nla_reserve(skb, type, len) reserve room for an attribute |
@@ -220,9 +220,9 @@ struct nl_info { | |||
220 | u32 pid; | 220 | u32 pid; |
221 | }; | 221 | }; |
222 | 222 | ||
223 | extern void netlink_run_queue(struct sock *sk, unsigned int *qlen, | 223 | extern int netlink_rcv_skb(struct sk_buff *skb, |
224 | int (*cb)(struct sk_buff *, | 224 | int (*cb)(struct sk_buff *, |
225 | struct nlmsghdr *)); | 225 | struct nlmsghdr *)); |
226 | extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, | 226 | extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, |
227 | u32 pid, unsigned int group, int report, | 227 | u32 pid, unsigned int group, int report, |
228 | gfp_t flags); | 228 | gfp_t flags); |
@@ -667,6 +667,15 @@ static inline int nla_padlen(int payload) | |||
667 | } | 667 | } |
668 | 668 | ||
669 | /** | 669 | /** |
670 | * nla_type - attribute type | ||
671 | * @nla: netlink attribute | ||
672 | */ | ||
673 | static inline int nla_type(const struct nlattr *nla) | ||
674 | { | ||
675 | return nla->nla_type & NLA_TYPE_MASK; | ||
676 | } | ||
677 | |||
678 | /** | ||
670 | * nla_data - head of payload | 679 | * nla_data - head of payload |
671 | * @nla: netlink attribute | 680 | * @nla: netlink attribute |
672 | */ | 681 | */ |
@@ -697,7 +706,7 @@ static inline int nla_ok(const struct nlattr *nla, int remaining) | |||
697 | } | 706 | } |
698 | 707 | ||
699 | /** | 708 | /** |
700 | * nla_next - next netlink attribte in attribute stream | 709 | * nla_next - next netlink attribute in attribute stream |
701 | * @nla: netlink attribute | 710 | * @nla: netlink attribute |
702 | * @remaining: number of bytes remaining in attribute stream | 711 | * @remaining: number of bytes remaining in attribute stream |
703 | * | 712 | * |
@@ -773,7 +782,7 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
773 | ({ data = nla_len(nla) >= len ? nla_data(nla) : NULL; \ | 782 | ({ data = nla_len(nla) >= len ? nla_data(nla) : NULL; \ |
774 | __nla_parse_nested_compat(tb, maxtype, nla, policy, len); }) | 783 | __nla_parse_nested_compat(tb, maxtype, nla, policy, len); }) |
775 | /** | 784 | /** |
776 | * nla_put_u8 - Add a u16 netlink attribute to a socket buffer | 785 | * nla_put_u8 - Add a u8 netlink attribute to a socket buffer |
777 | * @skb: socket buffer to add attribute to | 786 | * @skb: socket buffer to add attribute to |
778 | * @attrtype: attribute type | 787 | * @attrtype: attribute type |
779 | * @value: numeric value | 788 | * @value: numeric value |
@@ -989,7 +998,7 @@ static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype) | |||
989 | 998 | ||
990 | /** | 999 | /** |
991 | * nla_nest_end - Finalize nesting of attributes | 1000 | * nla_nest_end - Finalize nesting of attributes |
992 | * @skb: socket buffer the attribtues are stored in | 1001 | * @skb: socket buffer the attributes are stored in |
993 | * @start: container attribute | 1002 | * @start: container attribute |
994 | * | 1003 | * |
995 | * Corrects the container attribute header to include the all | 1004 | * Corrects the container attribute header to include the all |
@@ -1032,7 +1041,7 @@ static inline struct nlattr *nla_nest_compat_start(struct sk_buff *skb, | |||
1032 | 1041 | ||
1033 | /** | 1042 | /** |
1034 | * nla_nest_compat_end - Finalize nesting of compat attributes | 1043 | * nla_nest_compat_end - Finalize nesting of compat attributes |
1035 | * @skb: socket buffer the attribtues are stored in | 1044 | * @skb: socket buffer the attributes are stored in |
1036 | * @start: container attribute | 1045 | * @start: container attribute |
1037 | * | 1046 | * |
1038 | * Corrects the container attribute header to include the all | 1047 | * Corrects the container attribute header to include the all |