cn_msg
struct cn_msg *msg;
struct cn_msg *msg;
struct cn_msg *msg;
struct cn_msg *msg;
struct cn_msg *msg;
struct cn_msg *msg;
struct cn_msg *msg;
#define CN_PROC_MSG_SIZE (sizeof(struct cn_msg) + sizeof(struct proc_event) + 4)
struct cn_msg *msg;
static inline struct cn_msg *buffer_to_cn_msg(__u8 *buffer)
BUILD_BUG_ON(sizeof(struct cn_msg) != 20);
return (struct cn_msg *)(buffer + 4);
struct cn_msg *msg;
static void cn_proc_mcast_ctl(struct cn_msg *msg,
static inline void send_msg(struct cn_msg *msg)
void (*callback)(struct cn_msg *,
void (*callback)(struct cn_msg *,
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group,
struct cn_msg *msg = nlmsg_data(nlmsg_hdr(skb));
if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len)
if (len < (int)sizeof(struct cn_msg) ||
void (*callback)(struct cn_msg *,
int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid, u32 __group,
struct cn_msg *data;
static void hvt_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
struct cn_msg *cn_msg;
cn_msg = kzalloc(sizeof(*cn_msg) + len, GFP_ATOMIC);
if (!cn_msg)
cn_msg->id.idx = hvt->cn_id.idx;
cn_msg->id.val = hvt->cn_id.val;
cn_msg->len = len;
memcpy(cn_msg->data, msg, len);
ret = cn_netlink_send(cn_msg, 0, 0, GFP_ATOMIC);
kfree(cn_msg);
static void cn_ulog_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg);
memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg));
prealloced_ulog_tfr = prealloced + sizeof(struct cn_msg);
static struct cn_msg *prealloced_cn_msg;
struct cn_msg *msg = prealloced_cn_msg;
memset(msg, 0, sizeof(struct cn_msg));
static int fill_pkg(struct cn_msg *msg, struct dm_ulog_request *tfr)
struct cn_msg *m;
static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
block->cn = (struct cn_msg *)(block->cn->data +
w1_reply_make_space(block, sizeof(struct cn_msg) +
u16 space = sizeof(struct cn_msg) + sizeof(*req_msg) + sizeof(*req_cmd);
static void w1_netlink_send_error(struct cn_msg *cn, struct w1_netlink_msg *msg,
DEFINE_RAW_FLEX(struct cn_msg, packet, data,
DEFINE_RAW_FLEX(struct cn_msg, packet, data,
struct cn_msg *first_cn; /* fixed once the structure is populated */
struct cn_msg *cn; /* advances as cn_msg is appeneded */
struct cn_msg request_cn;
static int w1_process_command_root(struct cn_msg *req_cn, u32 portid)
struct cn_msg *cn;
if (cn->len + sizeof(*id) > PAGE_SIZE - sizeof(struct cn_msg)) {
static void w1_cn_callback(struct cn_msg *cn, struct netlink_skb_parms *nsp)
reply_size += 2 * cmd_count * (sizeof(struct cn_msg) +
sizeof(struct cn_msg) + reply_size;
block->first_cn = (struct cn_msg *)(node + node_count);
int cn_netlink_send_mult(struct cn_msg *msg, u16 len, u32 portid,
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 group, gfp_t gfp_mask);
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
void (*callback) (struct cn_msg *, struct netlink_skb_parms *);
void (*callback)(struct cn_msg *, struct netlink_skb_parms *));
struct cn_msg *m;
static void cn_test_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
struct cn_msg *msg = NULL;
struct cn_msg *data;
data = (struct cn_msg *)buf;
data = (struct cn_msg *)NLMSG_DATA(reply);
static int netlink_send(int s, struct cn_msg *msg)
struct cn_msg *m;
size = NLMSG_SPACE(sizeof(struct cn_msg) + msg->len);
((struct cn_msg *)NLMSG_DATA(hdr))->data;
#define NL_MESSAGE_SIZE (sizeof(struct nlmsghdr) + sizeof(struct cn_msg) + \
#define NL_MESSAGE_SIZE_NF (sizeof(struct nlmsghdr) + sizeof(struct cn_msg) + \
struct cn_msg *msg;
msg = (struct cn_msg *)NLMSG_DATA(hdr);