mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Move all non-standard, NuttX header files into include/nuttx/net
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4450 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
#include "uip/uip_internal.h"
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* net/getsockname.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/net.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
+2
-2
@@ -45,8 +45,8 @@
|
||||
#include <wdog.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip-arp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip-arp.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
#include "uip/uip_internal.h"
|
||||
|
||||
+2
-2
@@ -47,8 +47,8 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <nuttx/net.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
|
||||
+2
-2
@@ -48,8 +48,8 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include <uip/uip_internal.h>
|
||||
|
||||
+2
-2
@@ -47,8 +47,8 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* net/net_vfcntl.c
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/net.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include "net_internal.h"
|
||||
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_foreach.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -41,8 +41,8 @@
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <debug.h>
|
||||
#include <nuttx/net.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/net.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
+6
-6
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* net/netdev_ioctl.c
|
||||
*
|
||||
* Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -48,16 +48,16 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/net.h>
|
||||
#include <nuttx/net/net.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
# include "sys/sockio.h"
|
||||
# include "net/uip/uip-igmp.h"
|
||||
# include "nuttx/net/uip/uip-igmp.h"
|
||||
#endif
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
#include "uip/uip_internal.h"
|
||||
|
||||
+2
-2
@@ -49,10 +49,10 @@
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#ifdef CONFIG_NET_ARP_IPIN
|
||||
# include <net/uip/uip-arp.h>
|
||||
# include <nuttx/net/uip/uip-arp.h>
|
||||
#endif
|
||||
|
||||
#include "net_internal.h"
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <arch/irq.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "net_internal.h"
|
||||
#include "uip/uip_internal.h"
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <net/ethernet.h>
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <net/uip/uip-arp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arp.h>
|
||||
|
||||
#ifdef CONFIG_NET_ARP
|
||||
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <net/ethernet.h>
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <net/uip/uip-arp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-arp.h>
|
||||
|
||||
#ifdef CONFIG_NET_ARP
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
|
||||
#include <net/if.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
#include "../net_internal.h" /* Should not include this! */
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
+391
-391
File diff suppressed because it is too large
Load Diff
@@ -47,8 +47,8 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
#include <debug.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <net/uip/uip-ipopt.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip-ipopt.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-igmp.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-igmp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#ifdef CONFIG_NET
|
||||
|
||||
#include <stdint.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/uip/uip_input.c
|
||||
* netuip/uip_input.c
|
||||
* The uIP TCP/IP stack code.
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
@@ -85,9 +85,9 @@
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
# include "uip_neighbor.h"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <arch/irq.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Macro Definitions
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_NOINTS)
|
||||
|
||||
|
||||
+132
-132
@@ -1,132 +1,132 @@
|
||||
/****************************************************************************
|
||||
* net/uip/uip_mcastmac.c
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* The NuttX implementation of IGMP was inspired by the IGMP add-on for the
|
||||
* lwIP TCP/IP stack by Steve Reynolds:
|
||||
*
|
||||
* Copyright (c) 2002 CITEL Technologies Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_mcastmac
|
||||
*
|
||||
* Description:
|
||||
* Given an IP address (in network order), create a IGMP multicast MAC
|
||||
* address.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void uip_mcastmac(uip_ipaddr_t *ip, FAR uint8_t *mac)
|
||||
{
|
||||
/* This mapping is from the IETF IN RFC 1700 */
|
||||
|
||||
mac[0] = 0x01;
|
||||
mac[1] = 0x00;
|
||||
mac[2] = 0x5e;
|
||||
mac[3] = ip4_addr2(*ip) & 0x7f;
|
||||
mac[4] = ip4_addr3(*ip);
|
||||
mac[5] = ip4_addr4(*ip);
|
||||
|
||||
nvdbg("IP: %08x -> MAC: %02x%02x%02x%02x%02x%02x\n",
|
||||
*ip, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_addmcastmac
|
||||
*
|
||||
* Description:
|
||||
* Add an IGMP MAC address to the device's MAC filter table.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void uip_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip)
|
||||
{
|
||||
uint8_t mcastmac[6];
|
||||
|
||||
nvdbg("Adding: IP %08x\n", *ip);
|
||||
if (dev->d_addmac)
|
||||
{
|
||||
uip_mcastmac(ip, mcastmac);
|
||||
dev->d_addmac(dev, mcastmac);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_removemcastmac
|
||||
*
|
||||
* Description:
|
||||
* Remove an IGMP MAC address from the device's MAC filter table.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void uip_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip)
|
||||
{
|
||||
uint8_t mcastmac[6];
|
||||
|
||||
nvdbg("Removing: IP %08x\n", *ip);
|
||||
if (dev->d_rmmac)
|
||||
{
|
||||
uip_mcastmac(ip, mcastmac);
|
||||
dev->d_rmmac(dev, mcastmac);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_IGMP */
|
||||
/****************************************************************************
|
||||
* net/uip/uip_mcastmac.c
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* The NuttX implementation of IGMP was inspired by the IGMP add-on for the
|
||||
* lwIP TCP/IP stack by Steve Reynolds:
|
||||
*
|
||||
* Copyright (c) 2002 CITEL Technologies Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_mcastmac
|
||||
*
|
||||
* Description:
|
||||
* Given an IP address (in network order), create a IGMP multicast MAC
|
||||
* address.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void uip_mcastmac(uip_ipaddr_t *ip, FAR uint8_t *mac)
|
||||
{
|
||||
/* This mapping is from the IETF IN RFC 1700 */
|
||||
|
||||
mac[0] = 0x01;
|
||||
mac[1] = 0x00;
|
||||
mac[2] = 0x5e;
|
||||
mac[3] = ip4_addr2(*ip) & 0x7f;
|
||||
mac[4] = ip4_addr3(*ip);
|
||||
mac[5] = ip4_addr4(*ip);
|
||||
|
||||
nvdbg("IP: %08x -> MAC: %02x%02x%02x%02x%02x%02x\n",
|
||||
*ip, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_addmcastmac
|
||||
*
|
||||
* Description:
|
||||
* Add an IGMP MAC address to the device's MAC filter table.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void uip_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip)
|
||||
{
|
||||
uint8_t mcastmac[6];
|
||||
|
||||
nvdbg("Adding: IP %08x\n", *ip);
|
||||
if (dev->d_addmac)
|
||||
{
|
||||
uip_mcastmac(ip, mcastmac);
|
||||
dev->d_addmac(dev, mcastmac);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: uip_removemcastmac
|
||||
*
|
||||
* Description:
|
||||
* Remove an IGMP MAC address from the device's MAC filter table.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void uip_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip)
|
||||
{
|
||||
uint8_t mcastmac[6];
|
||||
|
||||
nvdbg("Removing: IP %08x\n", *ip);
|
||||
if (dev->d_rmmac)
|
||||
{
|
||||
uip_mcastmac(ip, mcastmac);
|
||||
dev->d_rmmac(dev, mcastmac);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_IGMP */
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define __UIP_NEIGHBOR_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <net/ethernet.h>
|
||||
|
||||
struct uip_neighbor_addr
|
||||
|
||||
+3
-3
@@ -42,9 +42,9 @@
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
+2
-2
@@ -44,8 +44,8 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <stdint.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* net/uip/uip_tcpbacklog.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -37,7 +37,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) && defined(CONFIG_NET_TCPBACKLOG)
|
||||
|
||||
#include <stdint.h>
|
||||
@@ -46,8 +46,8 @@
|
||||
#include <queue.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-tcp.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-tcp.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
|
||||
#include <arch/irq.h>
|
||||
|
||||
#include <net/uip/uipopt.h>
|
||||
#include <net/uip/uip.h>
|
||||
#include <net/uip/uip-arch.h>
|
||||
#include <nuttx/net/uip/uipopt.h>
|
||||
#include <nuttx/net/uip/uip.h>
|
||||
#include <nuttx/net/uip/uip-arch.h>
|
||||
|
||||
#include "uip_internal.h"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user