diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-09 11:58:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-09-09 11:58:50 +0000 |
commit | d12e00bdd6ffbb39ab5d45d5d5a484d293108021 (patch) | |
tree | a5ac9dcc5be841e9edff869055b73651f525072c /nuttx/net | |
parent | 712b9f5349a81fe56fa060ccb8aa13e0db830657 (diff) | |
download | px4-nuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.tar.gz px4-nuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.tar.bz2 px4-nuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.zip |
Added network init; refactored some header files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@338 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/net-dsec2timeval.c | 1 | ||||
-rw-r--r-- | nuttx/net/net-internal.h | 2 | ||||
-rw-r--r-- | nuttx/net/net-sockets.c | 9 | ||||
-rw-r--r-- | nuttx/net/net-timeo.c | 2 | ||||
-rw-r--r-- | nuttx/net/net-timeval2dsec.c | 1 | ||||
-rw-r--r-- | nuttx/net/recvfrom.c | 1 |
6 files changed, 14 insertions, 2 deletions
diff --git a/nuttx/net/net-dsec2timeval.c b/nuttx/net/net-dsec2timeval.c index d9b81b436..0ff1ab2c2 100644 --- a/nuttx/net/net-dsec2timeval.c +++ b/nuttx/net/net-dsec2timeval.c @@ -43,6 +43,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <errno.h> +#include <nuttx/clock.h> #include "net-internal.h" diff --git a/nuttx/net/net-internal.h b/nuttx/net/net-internal.h index 9f7fcaea0..b62099a16 100644 --- a/nuttx/net/net-internal.h +++ b/nuttx/net/net-internal.h @@ -43,6 +43,7 @@ #include <nuttx/config.h> #ifdef CONFIG_NET +#include <time.h> #include <nuttx/net.h> #include "net-internal.h" @@ -115,7 +116,6 @@ extern "C" { /* net-sockets.c *************************************************************/ -EXTERN void weak_function net_initialize(void); EXTERN int sockfd_allocate(void); EXTERN void sockfd_release(int sockfd); EXTERN FAR struct socket *sockfd_socket(int sockfd); diff --git a/nuttx/net/net-sockets.c b/nuttx/net/net-sockets.c index 0d3b39a23..3a6821051 100644 --- a/nuttx/net/net-sockets.c +++ b/nuttx/net/net-sockets.c @@ -38,13 +38,17 @@ ****************************************************************************/ #include <nuttx/config.h> + #include <string.h> #include <semaphore.h> #include <assert.h> #include <sched.h> #include <errno.h> + +#include <net/uip/uip.h> #include <nuttx/net.h> #include <nuttx/kmalloc.h> + #include "net-internal.h" /**************************************************************************** @@ -91,6 +95,11 @@ static void _net_semtake(FAR struct socketlist *list) void net_initialize(void) { + /* Initialize the uIP layer */ + + uip_init(); + + /* Initialize the socket lay -- nothing to do */ } /* Allocate a list of files for a new task */ diff --git a/nuttx/net/net-timeo.c b/nuttx/net/net-timeo.c index 930bf946d..65161ca1d 100644 --- a/nuttx/net/net-timeo.c +++ b/nuttx/net/net-timeo.c @@ -41,7 +41,7 @@ #if defined(CONFIG_NET) && defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK) #include <sys/types.h> -#include <nuttx/os_external.h> +#include <nuttx/clock.h> #include "net-internal.h" /**************************************************************************** diff --git a/nuttx/net/net-timeval2dsec.c b/nuttx/net/net-timeval2dsec.c index 401d8bcee..eb68fc4e5 100644 --- a/nuttx/net/net-timeval2dsec.c +++ b/nuttx/net/net-timeval2dsec.c @@ -43,6 +43,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <errno.h> +#include <nuttx/clock.h> #include "net-internal.h" diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index d4a1898c9..318f0d1bf 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -45,6 +45,7 @@ #include <string.h> #include <errno.h> #include <arch/irq.h> +#include <nuttx/clock.h> #include "net-internal.h" |