wimax_msg_alloc

Langue: en

Autres versions - même langue

Version: May 2009 (fedora - 06/07/09)

Section: 9 (Appels noyau Linux)

NAME

wimax_msg_alloc - Create a new skb for sending a message to userspace

SYNOPSIS

struct sk_buff * wimax_msg_alloc(struct wimax_dev * wimax_dev, const char * pipe_name, const void * msg, size_t size, gfp_t gfp_flags);

ARGUMENTS

wimax_dev

WiMAX device descriptor

pipe_name

"named pipe" the message will be sent to

msg

pointer to the message data to send

size

size of the message to send (in bytes), including the header.

gfp_flags

flags for memory allocation.

RETURNS

0 if ok, negative errno code on error

DESCRIPTION

Allocates an skb that will contain the message to send to user space over the messaging pipe and initializes it, copying the payload.

Once this call is done, you can deliver it with wimax_msg_send.

IMPORTANT

Don't use skb_push/skb_pull/skb_reserve on the skb, as wimax_msg_send depends on skb->data being placed at the beginning of the user message.