diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-23 20:45:30 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-23 20:45:30 +0000 |
commit | 7326b1166b618ddc6b3eb9e9224b1f5ded5515a5 (patch) | |
tree | aac340a4c4cc123213e08b83d1c452a67f333a35 /nuttx/include/net | |
parent | 1b15ed82bb5f48d8a03366af769331eac73c9993 (diff) | |
download | px4-nuttx-7326b1166b618ddc6b3eb9e9224b1f5ded5515a5.tar.gz px4-nuttx-7326b1166b618ddc6b3eb9e9224b1f5ded5515a5.tar.bz2 px4-nuttx-7326b1166b618ddc6b3eb9e9224b1f5ded5515a5.zip |
Partial implementation of accept() and listen()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@354 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/net')
-rw-r--r-- | nuttx/include/net/uip/httpd.h | 2 | ||||
-rw-r--r-- | nuttx/include/net/uip/uip.h | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/nuttx/include/net/uip/httpd.h b/nuttx/include/net/uip/httpd.h index ff99ddb36..ef21cc6ba 100644 --- a/nuttx/include/net/uip/httpd.h +++ b/nuttx/include/net/uip/httpd.h @@ -34,6 +34,6 @@ #include <sys/types.h> extern void httpd_init(void); -extern void httpd_listen(void); +extern int httpd_listen(void); #endif /* _NET_UIP_HTTPD_H */ diff --git a/nuttx/include/net/uip/uip.h b/nuttx/include/net/uip/uip.h index ed511f92e..fae05836c 100644 --- a/nuttx/include/net/uip/uip.h +++ b/nuttx/include/net/uip/uip.h @@ -159,32 +159,30 @@ typedef uip_ip4addr_t uip_ipaddr_t; * file pointers) for the connection. */ -struct uip_driver_s; /* Forward reference */ +struct uip_driver_s; /* Forward reference */ struct uip_conn { dq_entry_t node; /* Implements a doubly linked list */ uip_ipaddr_t ripaddr; /* The IP address of the remote host. */ uint16 lport; /* The local TCP port, in network byte order. */ - uint16 rport; /* The local remote TCP port, in network byte - order. */ + uint16 rport; /* The local remote TCP port, in network byte order. */ uint8 rcv_nxt[4]; /* The sequence number that we expect to - receive next. */ - uint8 snd_nxt[4]; /* The sequence number that was last sent by - us. */ + * receive next. */ + uint8 snd_nxt[4]; /* The sequence number that was last sent by us. */ uint16 len; /* Length of the data that was previously sent. */ uint16 mss; /* Current maximum segment size for the - connection. */ + * connection. */ uint16 initialmss; /* Initial maximum segment size for the - connection. */ + * connection. */ uint8 sa; /* Retransmission time-out calculation state - variable. */ + * variable. */ uint8 sv; /* Retransmission time-out calculation state - variable. */ + * variable. */ uint8 rto; /* Retransmission time-out. */ uint8 tcpstateflags; /* TCP state and flags. */ uint8 timer; /* The retransmission timer. */ uint8 nrtx; /* The number of retransmissions for the last - segment sent. */ + * segment sent. */ /* Higher level logic can retain application specific information * in the following: @@ -192,6 +190,8 @@ struct uip_conn void *data_private; void (*data_event)(struct uip_driver_s *dev, void *private); + void *accept_private; + int (*accept)(void *private, struct uip_conn *conn); void *connection_private; void (*connection_event)(void *private); }; @@ -564,7 +564,7 @@ extern int uip_tcpconnect(struct uip_conn *conn, const struct sockaddr_in *addr) * port A 16-bit port number in network byte order. */ -void uip_listen(uint16 port); +int uip_listen(uint16 port); /* Stop listening to the specified port. * @@ -574,7 +574,7 @@ void uip_listen(uint16 port); * port A 16-bit port number in network byte order. */ -void uip_unlisten(uint16 port); +int uip_unlisten(uint16 port); /* Check if a connection has outstanding (i.e., unacknowledged) data. * |