usb_pipe_get_private man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

USB_PIPE_SET_PRIVATE(9F)			      USB_PIPE_SET_PRIVATE(9F)

NAME
       usb_pipe_set_private,  usb_pipe_get_private  -  USB  user-defined  pipe
       data-field facility

SYNOPSIS
       #include <sys/usb/usba.h>

       int usb_pipe_set_private(usb_pipe_handle_t pipe_handle, usb_opaque_t data);

       usb_opaque_t usb_pipe_get_private (usb_pipe_handle_t pipe_handle);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI)

PARAMETERS
       For usb_pipe_set_private():

       pipe_handle
		      Pipe handle into which user-defined data is placed.

       data
		      Data to store in the pipe handle.

       For usb_pipe_get_private():

       pipe_handle
		      Pipe handle from which user-defined data is retrieved.

DESCRIPTION
       The usb_set_driver_private() function initializes the user-private data
       field of the pipe referred to by pipe_handle, using data. The user-pri‐
       vate data field is  used to store any data the client  desires  and  is
       not  used  in any way by the USBA or OS framework. Client drivers often
       store their soft-state here for convenient retrieval by their  callback
       handlers.

       The  usb_get_driver_private()  function retrieves the user-private data
       stored via usb_set_driver_private(),  from  the	pipe  referred	to  by
       pipe_handle.

RETURN VALUES
       For usb_pipe_set_private():

       USB_SUCCESS
			   Private  data  has been successfully stored in pipe
			   handle.

       USB_INVALID_PIPE
			   pipe_handle argument is NULL or invalid.

			   Pipe is closing or closed.

       USB_INVALID_PERM
			   The pipe_handle argument refers to the default con‐
			   trol pipe.

       For usb_pipe_get_private():

       On success: usb_opaque_t pointer to data being retrieved.

       On  failure:  NULL.  Fails  if pipe handle is NULL or invalid. Fails if
       pipe handle is to a pipe which is closing or closed.

CONTEXT
       May be called from user, kernel or interrupt context.

EXAMPLES
	     usb_pipe_handle_t pipe;

	     /* Some driver defined datatype. */
	     xxx_data_t *data = kmem_zalloc(...);

	     usb_pipe_set_private(pipe, data);

	     ----

	     xxx_data_t *xxx_data_ptr = (xxx_data_t *)usb_pipe_get_private(pipe);

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬───────────────────┐
       │  ATTRIBUTE TYPE    │  ATTRIBUTE VALUE	│
       ├────────────────────┼───────────────────┤
       │Architecture	    │ PCI-based systems │
       ├────────────────────┼───────────────────┤
       │Interface stability │ Committed		│
       └────────────────────┴───────────────────┘

SEE ALSO
       attributes(5), usb_pipe_open(9F), usb_alloc_request(9F)

				  Jan 5, 2004	      USB_PIPE_SET_PRIVATE(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net