mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 12:08:36 +08:00
Add ioctls for Unix domain sockets
This commit is contained in:
parent
bf61008448
commit
d7189558a6
2 changed files with 16 additions and 0 deletions
|
@ -169,6 +169,11 @@
|
|||
#define SIOCGMIIREG _SIOC(0x004d) /* Get a MII register via MDIO */
|
||||
#define SIOCSMIIREG _SIOC(0x004e) /* Set a MII register via MDIO */
|
||||
|
||||
/* Unix domain sockets ******************************************************/
|
||||
|
||||
#define SIOCINQ _SIOC(0x004f) /* Returns the amount of queued unread
|
||||
* data in the receive */
|
||||
|
||||
/****************************************************************************
|
||||
* Type Definitions
|
||||
****************************************************************************/
|
||||
|
|
|
@ -74,6 +74,17 @@ struct sockaddr_un
|
|||
char sun_path[UNIX_PATH_MAX]; /* pathname */
|
||||
};
|
||||
|
||||
/* There are three types of addresses:
|
||||
*
|
||||
* 1. pathname: sun_path holds a null terminated string. The allocated
|
||||
* size may be variable: sizeof(sa_family_t) + strlen(pathname) + 1
|
||||
* 2. unnamed: A unix socket that is not bound to any name. This case
|
||||
* there is no path. The allocated size may be sizeof(sa_family_t)
|
||||
* 3. abstract. The abstract path is destinguished because the pathname
|
||||
* consists of only the NUL terminator. The allocated size is then
|
||||
* sizeof(s_family_t) + 1.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
Loading…
Reference in a new issue