diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-24 11:57:06 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-24 11:57:06 -0600 |
commit | 8bd0538080de0f5fa2a5ed465dfc3ce3309807c0 (patch) | |
tree | 9687ba25ecb0826bf2590f88a3e9a0e45645a52f | |
parent | 0a8a35f1f8b62940e5f6357943b8d373da353c90 (diff) | |
download | nuttx-8bd0538080de0f5fa2a5ed465dfc3ce3309807c0.tar.gz nuttx-8bd0538080de0f5fa2a5ed465dfc3ce3309807c0.tar.bz2 nuttx-8bd0538080de0f5fa2a5ed465dfc3ce3309807c0.zip |
Add ioctls for Unix domain sockets
-rw-r--r-- | nuttx/include/nuttx/net/ioctl.h | 5 | ||||
-rw-r--r-- | nuttx/include/sys/un.h | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/net/ioctl.h b/nuttx/include/nuttx/net/ioctl.h index afaa1df13..3442698a4 100644 --- a/nuttx/include/nuttx/net/ioctl.h +++ b/nuttx/include/nuttx/net/ioctl.h @@ -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 ****************************************************************************/ diff --git a/nuttx/include/sys/un.h b/nuttx/include/sys/un.h index a9eb1cd30..eb431780c 100644 --- a/nuttx/include/sys/un.h +++ b/nuttx/include/sys/un.h @@ -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 ****************************************************************************/ |