prop_array_send_ioctl man page on NetBSD

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

PROP_SEND_IOCTL(3)	 BSD Library Functions Manual	    PROP_SEND_IOCTL(3)

NAME
     prop_array_send_ioctl, prop_array_recv_ioctl, prop_dictionary_send_ioctl,
     prop_dictionary_recv_ioctl, prop_dictionary_sendrecv_ioctl — Send and
     receive propertly lists to and from the kernel using ioctl

SYNOPSIS
     #include <prop/proplib.h>

     int
     prop_array_send_ioctl(prop_array_t array, int fd, unsigned long cmd);

     int
     prop_array_recv_ioctl(int fd, unsigned long cmd, prop_array_t *arrayp);

     int
     prop_dictionary_send_ioctl(prop_dictionary_t dict, int fd,
	 unsigned long cmd);

     int
     prop_dictionary_recv_ioctl(int fd, unsigned long cmd,
	 prop_dictionary_t *dictp);

     int
     prop_dictionary_sendrecv_ioctl(prop_dictionary_t dict, int fd,
	 unsigned long cmd, prop_dictionary_t *dictp);

DESCRIPTION
     The prop_array_send_ioctl, prop_array_recv_ioctl,
     prop_dictionary_send_ioctl, prop_dictionary_recv_ioctl, and
     prop_dictionary_sendrecv_ioctl functions implement the user space side of
     a protocol for sending property lists to and from the kernel using
     ioctl(2).

RETURN VALUES
     If successful, functions return zero.  Otherwise, an error number is
     returned to indicate the error.

EXAMPLES
     The following (simplified) example demonstrates using
     prop_dictionary_send_ioctl() and prop_dictionary_recv_ioctl() in an
     application:

     void
     foo_setprops(prop_dictionary_t dict)
     {
	 int fd;

	 fd = open("/dev/foo", O_RDWR, 0640);
	 if (fd == -1)
	     return;

	 (void) prop_dictionary_send_ioctl(dict, fd, FOOSETPROPS);

	 (void) close(fd);
     }

     prop_dictionary_t
     foo_getprops(void)
     {
	 prop_dictionary_t dict;
	 int fd;

	 fd = open("/dev/foo", O_RDONLY, 0640);
	 if (fd == -1)
	     return (NULL);

	 if (prop_dictionary_recv_ioctl(fd, FOOGETPROPS, &dict) != 0)
	     return (NULL);

	 (void) close(fd);

	 return (dict);
     }

     The prop_dictionary_sendrecv_ioctl function combines the send and receive
     functionality, allowing for ioctls that require two-way communication
     (for example to specify arguments for the ioctl operation).

ERRORS
     prop_array_send_ioctl() and prop_dictionary_send_ioctl() will fail if:

     [ENOMEM]		Cannot allocate memory

     [ENOTSUP]		Not supported

     prop_array_recv_ioctl() and prop_dictionary_recv_ioctl() will fail if:

     [EIO]		Input/output error

     [ENOTSUP]		Not supported

     In addition to these, ioctl(2) errors may be returned.

SEE ALSO
     prop_array(3), prop_dictionary(3), proplib(3), prop_copyin_ioctl(9)

HISTORY
     The proplib property container object library first appeared in
     NetBSD 4.0.

BSD			       January 21, 2008				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

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