Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wimax_msg_alloc(9) [suse man page]

WIMAX_MSG_ALLOC(9)						 Linux Networking						WIMAX_MSG_ALLOC(9)

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. Unlike other WiMAX stack calls, this call can be used way early, even before wimax_dev_add is called, as long as the wimax_dev->net_dev pointer is set to point to a proper net_dev. This is so that drivers can use it early in case they need to send stuff around or communicate with user space. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 WIMAX_MSG_ALLOC(9)

Check Out this Related Man Page

USB_CONTROL_MSG(9)						   USB Core APIs						USB_CONTROL_MSG(9)

NAME
usb_control_msg - Builds a control urb, sends it off and waits for completion SYNOPSIS
int usb_control_msg(struct usb_device * dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void * data, __u16 size, int timeout); ARGUMENTS
dev pointer to the usb device to send the message to pipe endpoint "pipe" to send the message to request USB message request value requesttype USB message request type value value USB message value index USB message index value data pointer to the data to send size length in bytes of the data to send timeout time in msecs to wait for the message to complete before timing out (if 0 the wait is forever) CONTEXT
!in_interrupt () DESCRIPTION
This function sends a simple control message to a specified endpoint and waits for the message to complete, or timeout. If successful, it returns the number of bytes transferred, otherwise a negative error number. Don't use this function from within an interrupt context, like a bottom half handler. If you need an asynchronous message, or need to send a message from within interrupt context, use usb_submit_urb. If a thread in your driver uses this call, make sure your disconnect method can wait for it to complete. Since you don't have a handle on the URB used, you can't cancel the request. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 USB_CONTROL_MSG(9)
Man Page