mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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:
@@ -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
@@ -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);
|
||||
|
||||
@@ -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
@@ -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"
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <errno.h>
|
||||
#include <nuttx/clock.h>
|
||||
|
||||
#include "net-internal.h"
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/clock.h>
|
||||
|
||||
#include "net-internal.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user