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
This commit is contained in:
patacongo
2007-09-09 11:58:50 +00:00
parent 4283c46855
commit 01207cc66e
39 changed files with 208 additions and 55 deletions
+1
View File
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <nuttx/clock.h>
#include "net-internal.h"
+1 -1
View File
@@ -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);
+9
View File
@@ -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 */
+1 -1
View File
@@ -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"
/****************************************************************************
+1
View File
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <nuttx/clock.h>
#include "net-internal.h"
+1
View File
@@ -45,6 +45,7 @@
#include <string.h>
#include <errno.h>
#include <arch/irq.h>
#include <nuttx/clock.h>
#include "net-internal.h"