summaryrefslogtreecommitdiff
path: root/nuttx/include/sys/socket.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-05 23:52:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-05 23:52:08 +0000
commit75ef214a64e81862cc0d12feee25bfbc684999c5 (patch)
tree58e45bf14015dce38318a1a59848f46bc11c3203 /nuttx/include/sys/socket.h
parente72381a2740de4ba67cefdfe61f351a698e9eecf (diff)
downloadpx4-nuttx-75ef214a64e81862cc0d12feee25bfbc684999c5.tar.gz
px4-nuttx-75ef214a64e81862cc0d12feee25bfbc684999c5.tar.bz2
px4-nuttx-75ef214a64e81862cc0d12feee25bfbc684999c5.zip
Add socket options
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@331 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/sys/socket.h')
-rw-r--r--nuttx/include/sys/socket.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/nuttx/include/sys/socket.h b/nuttx/include/sys/socket.h
index e1204e68a..776c0f403 100644
--- a/nuttx/include/sys/socket.h
+++ b/nuttx/include/sys/socket.h
@@ -115,6 +115,40 @@
#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE. */
#define MSG_MORE 0x8000 /* Sender will send more. */
+/* Socket options */
+
+#define SO_DEBUG 1 /* Enables recording of debugging information (get/set).
+ * arg: integer contain boolean value */
+#define SO_ACCEPTCONN 2 /* Reports whether socket listening is enabled (get only).
+ * arg: returns integer contain boolean value */
+#define SO_BROADCAST 3 /* Permits sending of broadcast messages (get/set).
+ * arg: integer contain boolean value */
+#define SO_REUSEADDR 4 /* Allow reuse of local addresses (get/set)
+ * arg: integer contain boolean value */
+#define SO_KEEPALIVE 5 /* Keeps connections active by enabling the periodic transmission
+ * of messages (get/set). arg: int */
+#define SO_LINGER 6 /* Lingers on a close() if data is present (get/set)
+ * arg: struct linger */
+#define SO_OOBINLINE 7 /* Leaves received out-of-band data (data marked urgent) inline
+ * (get/set) arg: integer contain boolean value */
+#define SO_SNDBUF 8 /* Sets send buffer size. arg: integer value (get/set). */
+#define SO_RCVBUF 9 /* Sets receive buffer size. arg: integer value (get/set). */
+#define SO_ERROR 10 /* Reports and clears error statust (get only). arg: returns
+ * an integer value
+#define SO_TYPE 11 /* Reports the socket type (get only). return: int */
+#define SO_DONTROUTE 12 /* equests that outgoing messages bypass standard routing
+ * arg: integer contain boolean value */
+#define SO_RCVLOWAT 13 /* Sets the minimum number of bytes to process for socket input
+ * (get/set). arg: integer value */
+#define SO_RCVTIMEO 14 /* Sets the timeout value that specifies the maximum amount of time
+ * an input function waits until it completes (get/set).
+ * arg: struct timeval */
+#define SO_SNDLOWAT 15 /* Sets the minimum number of bytes to process for socket output
+ * (get/set). arg: integer value */
+#define SO_SNDTIMEO 16 /* Sets the timeout value specifying the amount of time that an
+ * output function blocks because flow control prevents data from
+ * being sent(get/set). arg: struct timeval */
+
/****************************************************************************
* Type Definitions
****************************************************************************/
@@ -149,6 +183,10 @@ EXTERN ssize_t recv(int sockfd, void *buf, size_t len, int flags);
EXTERN ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen);
+EXTERN int setsockopt(int sockfd, int level, int option,
+ const void *value, socklen_t value_len);
+EXTERN int setsockopt(int sockfd, int level, int option,
+ const void *value, socklen_t value_len);
#undef EXTERN
#if defined(__cplusplus)