rdma_netlink.h (bf61c8840efe60fd8f91446860b63338fb424158) rdma_netlink.h (30dc5e63d6a5ad24894b5512d10b228d73645a44)
1#ifndef _RDMA_NETLINK_H
2#define _RDMA_NETLINK_H
3
4
5#include <linux/netlink.h>
6#include <uapi/rdma/rdma_netlink.h>
7
8struct ibnl_client_cbs {

--- 29 unchanged lines hidden (view full) ---

38 * @nlh: Pointer to put the header of the new netlink message.
39 * @seq: The message sequence number.
40 * @len: The requested message length to allocate.
41 * @client: Calling IB netlink client.
42 * @op: message content op.
43 * Returns the allocated buffer on success and NULL on failure.
44 */
45void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq,
1#ifndef _RDMA_NETLINK_H
2#define _RDMA_NETLINK_H
3
4
5#include <linux/netlink.h>
6#include <uapi/rdma/rdma_netlink.h>
7
8struct ibnl_client_cbs {

--- 29 unchanged lines hidden (view full) ---

38 * @nlh: Pointer to put the header of the new netlink message.
39 * @seq: The message sequence number.
40 * @len: The requested message length to allocate.
41 * @client: Calling IB netlink client.
42 * @op: message content op.
43 * Returns the allocated buffer on success and NULL on failure.
44 */
45void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq,
46 int len, int client, int op);
46 int len, int client, int op, int flags);
47/**
48 * Put a new attribute in a supplied skb.
49 * @skb: The netlink skb.
50 * @nlh: Header of the netlink message to append the attribute to.
51 * @len: The length of the attribute data.
52 * @data: The attribute data to put.
53 * @type: The attribute type.
54 * Returns the 0 and a negative error code on failure.
55 */
56int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
57 int len, void *data, int type);
58
47/**
48 * Put a new attribute in a supplied skb.
49 * @skb: The netlink skb.
50 * @nlh: Header of the netlink message to append the attribute to.
51 * @len: The length of the attribute data.
52 * @data: The attribute data to put.
53 * @type: The attribute type.
54 * Returns the 0 and a negative error code on failure.
55 */
56int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh,
57 int len, void *data, int type);
58
59/**
60 * Send the supplied skb to a specific userspace PID.
61 * @skb: The netlink skb
62 * @nlh: Header of the netlink message to send
63 * @pid: Userspace netlink process ID
64 * Returns 0 on success or a negative error code.
65 */
66int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
67 __u32 pid);
68
69/**
70 * Send the supplied skb to a netlink group.
71 * @skb: The netlink skb
72 * @nlh: Header of the netlink message to send
73 * @group: Netlink group ID
74 * @flags: allocation flags
75 * Returns 0 on success or a negative error code.
76 */
77int ibnl_multicast(struct sk_buff *skb, struct nlmsghdr *nlh,
78 unsigned int group, gfp_t flags);
79
59#endif /* _RDMA_NETLINK_H */
80#endif /* _RDMA_NETLINK_H */