summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/include/nuttx/net.h')
-rw-r--r--nuttx/include/nuttx/net.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/nuttx/include/nuttx/net.h b/nuttx/include/nuttx/net.h
index ab6b4b93a..ce21f4984 100644
--- a/nuttx/include/nuttx/net.h
+++ b/nuttx/include/nuttx/net.h
@@ -67,15 +67,22 @@
* Public Types
****************************************************************************/
+/* This defines a bitmap big enough for one bit for each socket option */
+
+typedef uint16 sockopt_t;
+
/* This is the internal representation of a socket reference by a file
* descriptor.
*/
struct socket
{
- int s_crefs; /* Reference count on the socket */
- uint8 s_type; /* Protocol type: Only SOCK_STREAM or SOCK_DGRAM */
- void *s_conn; /* Connection: struct uip_conn * or uip_udp_conn * */
+ int s_crefs; /* Reference count on the socket */
+ uint8 s_type; /* Protocol type: Only SOCK_STREAM or SOCK_DGRAM */
+#ifdef CONFIG_NET_SOCKOPTS
+ sockopt_t s_options; /* Selected socket options */
+#endif
+ void *s_conn; /* Connection: struct uip_conn * or uip_udp_conn * */
};
/* This defines a list of sockets indexed by the socket descriptor */
@@ -89,6 +96,10 @@ struct socketlist
};
#endif
+/* This defines a bitmap big enough for one bit for each socket option */
+
+typedef uint16 sockopt_t;
+
/****************************************************************************
* Public Function Prototypes
****************************************************************************/