Added support for socket descriptors

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@318 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-09-01 18:06:15 +00:00
parent c60f939f91
commit 29aeec7b8a
44 changed files with 1900 additions and 1205 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c \
ifeq ($(CONFIG_FS_FAT),y)
CSRCS += up_blockdevice.c up_deviceimage.c
endif
ifeq ($(CONFIG_NET_UIP),y)
ifeq ($(CONFIG_NET),y)
CSRCS += up_uipdriver.c
SPECSRCS += up_tapdev.c
endif
+1 -1
View File
@@ -83,7 +83,7 @@ void up_idle(void)
/* Run the network if enabled */
#ifdef CONFIG_NET_UIP
#ifdef CONFIG_NET
uipdriver_loop();
#endif
}
+1 -1
View File
@@ -86,7 +86,7 @@ void up_initialize(void)
devnull_register(); /* Standard /dev/null */
up_devconsole(); /* Our private /dev/console */
up_registerblockdevice(); /* Our simulated block device /dev/blkdev */
#ifdef CONFIG_NET_UIP
#ifdef CONFIG_NET
uipdriver_init(); /* Our "real" netwok driver */
#endif
}
+2 -2
View File
@@ -109,7 +109,7 @@ extern char *up_deviceimage(void);
/* up_tapdev.c ************************************************************/
#ifdef CONFIG_NET_UIP
#ifdef CONFIG_NET
extern unsigned long up_getwalltime( void );
extern void tapdev_init(void);
extern unsigned int tapdev_read(char *buf, unsigned int buflen);
@@ -118,7 +118,7 @@ extern void tapdev_send(char *buf, unsigned int buflen);
/* up_uipdriver.c *********************************************************/
#ifdef CONFIG_NET_UIP
#ifdef CONFIG_NET
extern int uipdriver_init(void);
extern void uipdriver_loop(void);
#endif
+5 -5
View File
@@ -106,7 +106,7 @@ void uipdriver_loop(void)
{
int i;
uip_len = tapdev_read(uip_buf, UIP_BUFSIZE);
uip_len = tapdev_read((char*)uip_buf, UIP_BUFSIZE);
if (uip_len > 0)
{
if (BUF->type == htons(UIP_ETHTYPE_IP))
@@ -122,7 +122,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
tapdev_send(uip_buf, uip_len);
tapdev_send((char*)uip_buf, uip_len);
}
}
else if (BUF->type == htons(UIP_ETHTYPE_ARP))
@@ -136,7 +136,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
tapdev_send(uip_buf, uip_len);
tapdev_send((char*)uip_buf, uip_len);
}
}
}
@@ -155,7 +155,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
tapdev_send(uip_buf, uip_len);
tapdev_send((char*)uip_buf, uip_len);
}
}
@@ -172,7 +172,7 @@ void uipdriver_loop(void)
if (uip_len > 0)
{
uip_arp_out();
tapdev_send(uip_buf, uip_len);
tapdev_send((char*)uip_buf, uip_len);
}
}
#endif /* UIP_UDP */