mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Minor changes (but in lot of files): add #if/#endif for options where they could miss. #if LWIP_xxx if always put after #include "lwip/opt.h" (note this one indirectly include cc.h). Move others includes inside #if/#endif block.
This commit is contained in:
parent
027a70a415
commit
e3cd1ac1f9
@ -39,14 +39,16 @@
|
||||
/* This is the part of the API that is linked with
|
||||
the application */
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/api_msg.h"
|
||||
#include "lwip/tcpip.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#if !NO_SYS
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Create a new netconn (of a specific type) that has a callback function.
|
||||
@ -185,9 +187,12 @@ netconn_peer(struct netconn *conn, struct ip_addr *addr, u16_t *port)
|
||||
{
|
||||
LWIP_ERROR("netconn_peer: invalid conn", (conn != NULL), return ERR_ARG;);
|
||||
switch (NETCONNTYPE_GROUP(conn->type)) {
|
||||
#if LWIP_RAW
|
||||
case NETCONN_RAW:
|
||||
/* return an error as connecting is only a helper for upper layers */
|
||||
return ERR_CONN;
|
||||
#endif /* LWIP_RAW */
|
||||
#if LWIP_UDP
|
||||
case NETCONN_UDP:
|
||||
if (conn->pcb.udp == NULL ||
|
||||
((conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0))
|
||||
@ -195,12 +200,15 @@ netconn_peer(struct netconn *conn, struct ip_addr *addr, u16_t *port)
|
||||
*addr = (conn->pcb.udp->remote_ip);
|
||||
*port = conn->pcb.udp->remote_port;
|
||||
break;
|
||||
#endif /* LWIP_UDP */
|
||||
#if LWIP_TCP
|
||||
case NETCONN_TCP:
|
||||
if (conn->pcb.tcp == NULL)
|
||||
return ERR_CONN;
|
||||
*addr = (conn->pcb.tcp->remote_ip);
|
||||
*port = conn->pcb.tcp->remote_port;
|
||||
break;
|
||||
#endif /* LWIP_TCP */
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
@ -221,18 +229,24 @@ netconn_addr(struct netconn *conn, struct ip_addr **addr, u16_t *port)
|
||||
LWIP_ERROR("netconn_addr: invalid addr", (addr != NULL), return ERR_ARG;);
|
||||
LWIP_ERROR("netconn_addr: invalid port", (port != NULL), return ERR_ARG;);
|
||||
switch (NETCONNTYPE_GROUP(conn->type)) {
|
||||
#if LWIP_RAW
|
||||
case NETCONN_RAW:
|
||||
*addr = &(conn->pcb.raw->local_ip);
|
||||
*port = conn->pcb.raw->protocol;
|
||||
break;
|
||||
#endif /* LWIP_RAW */
|
||||
#if LWIP_UDP
|
||||
case NETCONN_UDP:
|
||||
*addr = &(conn->pcb.udp->local_ip);
|
||||
*port = conn->pcb.udp->local_port;
|
||||
break;
|
||||
#endif /* LWIP_UDP */
|
||||
#if LWIP_TCP
|
||||
case NETCONN_TCP:
|
||||
*addr = &(conn->pcb.tcp->local_ip);
|
||||
*port = conn->pcb.tcp->local_port;
|
||||
break;
|
||||
#endif /* LWIP_TCP */
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
@ -607,4 +621,4 @@ netconn_join_leave_group(struct netconn *conn,
|
||||
}
|
||||
#endif /* LWIP_IGMP */
|
||||
|
||||
#endif /* !NO_SYS */
|
||||
#endif /* LWIP_NETCONN */
|
||||
|
@ -37,15 +37,15 @@
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/api_msg.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/tcpip.h"
|
||||
#include "lwip/igmp.h"
|
||||
|
||||
#if !NO_SYS
|
||||
|
||||
/* forward declarations */
|
||||
#if LWIP_TCP
|
||||
static err_t do_writemore(struct netconn *conn);
|
||||
@ -931,4 +931,4 @@ do_join_leave_group(struct api_msg_msg *msg)
|
||||
}
|
||||
#endif /* LWIP_IGMP */
|
||||
|
||||
#endif /* !NO_SYS */
|
||||
#endif /* LWIP_NETCONN */
|
||||
|
@ -36,11 +36,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/netbuf.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Create (allocate) and initialize a new netbuf.
|
||||
* The netbuf doesn't yet contain a packet buffer!
|
||||
@ -227,3 +231,5 @@ netbuf_first(struct netbuf *buf)
|
||||
LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;);
|
||||
buf->ptr = buf->p;
|
||||
}
|
||||
|
||||
#endif /* LWIP_NETCONN */
|
||||
|
@ -32,12 +32,12 @@
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/netifapi.h"
|
||||
#include "lwip/tcpip.h"
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
|
||||
/**
|
||||
* Call netif_add() in a thread-safe way by running that function inside the
|
||||
* tcpip_thread context.
|
||||
|
@ -38,20 +38,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "lwip/sockets.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/api.h"
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/igmp.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/tcp.h"
|
||||
#include "lwip/tcpip.h"
|
||||
|
||||
#if !NO_SYS
|
||||
#include <string.h>
|
||||
|
||||
#define NUM_SOCKETS MEMP_NUM_NETCONN
|
||||
|
||||
@ -1081,11 +1080,13 @@ int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optl
|
||||
if (*optlen < sizeof(int)) {
|
||||
err = EINVAL;
|
||||
}
|
||||
#if LWIP_UDP
|
||||
if ((sock->conn->type != NETCONN_UDP) ||
|
||||
((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0)) {
|
||||
/* this flag is only available for UDP, not for UDP lite */
|
||||
err = EAFNOSUPPORT;
|
||||
}
|
||||
#endif /* LWIP_UDP */
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1278,9 +1279,11 @@ static void lwip_getsockopt_internal(void *arg)
|
||||
*(int *)optval = sock->conn->recv_timeout;
|
||||
break;
|
||||
#endif /* LWIP_SO_RCVTIMEO */
|
||||
#if LWIP_UDP
|
||||
case SO_NO_CHECK:
|
||||
*(int*)optval = (udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_NOCHKSUM) ? 1 : 0;
|
||||
break;
|
||||
#endif /* LWIP_UDP*/
|
||||
} /* switch (optname) */
|
||||
break;
|
||||
|
||||
@ -1405,11 +1408,13 @@ int lwip_setsockopt(int s, int level, int optname, const void *optval, socklen_t
|
||||
if (optlen < sizeof(int)) {
|
||||
err = EINVAL;
|
||||
}
|
||||
#if LWIP_UDP
|
||||
if ((sock->conn->type != NETCONN_UDP) ||
|
||||
((udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_UDPLITE) != 0)) {
|
||||
/* this flag is only available for UDP, not for UDP lite */
|
||||
err = EAFNOSUPPORT;
|
||||
}
|
||||
#endif /* LWIP_UDP */
|
||||
break;
|
||||
default:
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, SOL_SOCKET, UNIMPL: optname=0x%x, ..)\n",
|
||||
@ -1590,6 +1595,7 @@ static void lwip_setsockopt_internal(void *arg)
|
||||
sock->conn->recv_timeout = ( *(int*)optval );
|
||||
break;
|
||||
#endif /* LWIP_SO_RCVTIMEO */
|
||||
#if LWIP_UDP
|
||||
case SO_NO_CHECK:
|
||||
if (*(int*)optval) {
|
||||
udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_NOCHKSUM);
|
||||
@ -1597,6 +1603,7 @@ static void lwip_setsockopt_internal(void *arg)
|
||||
udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) & ~UDP_FLAGS_NOCHKSUM);
|
||||
}
|
||||
break;
|
||||
#endif /* LWIP_UDP */
|
||||
} /* switch (optname) */
|
||||
break;
|
||||
|
||||
@ -1755,4 +1762,4 @@ int lwip_ioctl(int s, long cmd, void *argp)
|
||||
} /* switch (cmd) */
|
||||
}
|
||||
|
||||
#endif /* !NO_SYS */
|
||||
#endif /* LWIP_SOCKET */
|
||||
|
@ -38,21 +38,17 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#if !NO_SYS /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/pbuf.h"
|
||||
|
||||
#include "netif/etharp.h"
|
||||
#include "netif/ppp_oe.h"
|
||||
|
||||
#include "lwip/ip_frag.h"
|
||||
#include "lwip/igmp.h"
|
||||
|
||||
#include "lwip/tcpip.h"
|
||||
#include "lwip/init.h"
|
||||
|
||||
#if !NO_SYS
|
||||
#include "netif/etharp.h"
|
||||
#include "netif/ppp_oe.h"
|
||||
|
||||
/* global variables */
|
||||
static void (* tcpip_init_done)(void *arg) = NULL;
|
||||
|
@ -68,7 +68,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/mem.h"
|
||||
@ -76,14 +78,12 @@
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "netif/etharp.h"
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lwip/autoip.h"
|
||||
#include "netif/etharp.h"
|
||||
|
||||
#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */
|
||||
#include <string.h>
|
||||
|
||||
/** global transaction identifier, must be
|
||||
* unique for each DHCP request. We simply increment, starting
|
||||
|
@ -39,11 +39,8 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/inet.h"
|
||||
|
||||
#include "lwip/sys.h"
|
||||
|
||||
/* These are some reference implementations of the checksum algorithm, with the
|
||||
|
@ -37,6 +37,7 @@
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/init.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/sys.h"
|
||||
@ -45,14 +46,13 @@
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "netif/etharp.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/raw.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/tcp.h"
|
||||
#include "lwip/autoip.h"
|
||||
#include "lwip/igmp.h"
|
||||
|
||||
#include "netif/etharp.h"
|
||||
|
||||
/* Compile-time sanity checks for configuration errors.
|
||||
* These can be done independently of LWIP_DEBUG, without penalty.
|
||||
|
@ -62,8 +62,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
@ -71,7 +73,8 @@
|
||||
#include "lwip/autoip.h"
|
||||
#include "netif/etharp.h"
|
||||
|
||||
#if LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* pseudo random macro based on netif informations. You could use "rand()" from the C Library if you define LWIP_AUTOIP_RAND in lwipopts.h */
|
||||
#ifndef LWIP_AUTOIP_RAND
|
||||
|
@ -39,9 +39,10 @@
|
||||
/* Some ICMP messages should be passed to the transport protocols. This
|
||||
is not implemented. */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/icmp.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/ip.h"
|
||||
@ -49,7 +50,7 @@
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Processes ICMP input packets, called from ip_input().
|
||||
|
@ -77,6 +77,10 @@ Steve Reynolds
|
||||
* Includes
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/debug.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
@ -89,12 +93,8 @@ Steve Reynolds
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/igmp.h"
|
||||
|
||||
#include "arch/perf.h"
|
||||
|
||||
#include "string.h"
|
||||
|
||||
#if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Globales
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
@ -39,7 +39,6 @@
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/ip.h"
|
||||
@ -47,22 +46,14 @@
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/icmp.h"
|
||||
#include "lwip/igmp.h"
|
||||
#include "lwip/raw.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include "arch/perf.h"
|
||||
|
||||
#include "lwip/snmp.h"
|
||||
#if LWIP_DHCP
|
||||
# include "lwip/dhcp.h"
|
||||
#endif /* LWIP_DHCP */
|
||||
|
||||
#if LWIP_IGMP
|
||||
# include "lwip/igmp.h"
|
||||
#endif /* LWIP_IGMP */
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "arch/perf.h"
|
||||
|
||||
/**
|
||||
* Initializes the IP layer.
|
||||
|
@ -36,6 +36,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/netif.h"
|
||||
|
@ -37,8 +37,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/ip_frag.h"
|
||||
@ -46,6 +44,8 @@
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if IP_REASSEMBLY
|
||||
static u8_t ip_reassbuf[IP_HLEN + IP_REASS_BUFSIZE];
|
||||
static u8_t ip_reassbitmap[IP_REASS_BUFSIZE / (8 * 8) + 1];
|
||||
|
@ -35,15 +35,14 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/icmp.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/def.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
void
|
||||
icmp_input(struct pbuf *p, struct netif *inp)
|
||||
{
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/inet.h"
|
||||
|
||||
|
||||
u8_t
|
||||
ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2,
|
||||
struct ip_addr *mask)
|
||||
|
@ -37,18 +37,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if !MEM_LIBC_MALLOC /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
|
||||
#include "lwip/sys.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#if !MEM_LIBC_MALLOC
|
||||
#include <string.h>
|
||||
|
||||
#if MEM_USE_POOLS
|
||||
/* lwIP head implemented with different sized pools */
|
||||
|
||||
@ -511,4 +510,5 @@ void *mem_calloc(size_t count, size_t size)
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif /* !MEM_LIBC_MALLOC */
|
||||
|
@ -36,9 +36,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/udp.h"
|
||||
@ -50,10 +49,9 @@
|
||||
#include "lwip/tcpip.h"
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#if ARP_QUEUEING
|
||||
#include "netif/etharp.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
struct memp {
|
||||
struct memp *next;
|
||||
|
@ -44,10 +44,7 @@
|
||||
#include "lwip/tcp.h"
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/igmp.h"
|
||||
|
||||
#if LWIP_ARP
|
||||
#include "netif/etharp.h"
|
||||
#endif /* LWIP_ARP */
|
||||
|
||||
#if LWIP_NETIF_STATUS_CALLBACK
|
||||
#define NETIF_STATUS_CALLBACK(n) { if (n->status_callback) (n->status_callback)(n); }
|
||||
|
@ -61,9 +61,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
@ -72,6 +71,8 @@
|
||||
#include "lwip/sys.h"
|
||||
#include "arch/perf.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define SIZEOF_STRUCT_PBUF LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf))
|
||||
/* Since the pool is created in memp, PBUF_POOL_BUFSIZE will be automatically
|
||||
aligned there. Therefore, PBUF_POOL_BUFSIZE_ALIGNED can be used here. */
|
||||
|
@ -38,23 +38,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/raw.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include "arch/perf.h"
|
||||
#include "lwip/snmp.h"
|
||||
#include "arch/perf.h"
|
||||
|
||||
#if LWIP_RAW
|
||||
#include <string.h>
|
||||
|
||||
/** The list of RAW PCBs */
|
||||
static struct raw_pcb *raw_pcbs = NULL;
|
||||
|
@ -36,7 +36,8 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/snmp_asn1.h"
|
||||
|
||||
/**
|
||||
@ -654,4 +655,3 @@ snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw
|
||||
}
|
||||
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
|
@ -36,7 +36,8 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/snmp_asn1.h"
|
||||
|
||||
/**
|
||||
|
@ -37,17 +37,17 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "netif/etharp.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/ip_frag.h"
|
||||
#include "lwip/tcp.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/snmp_asn1.h"
|
||||
#include "lwip/snmp_structs.h"
|
||||
#include "netif/etharp.h"
|
||||
|
||||
/**
|
||||
* IANA assigned enterprise ID for lwIP is 26381
|
||||
|
@ -34,12 +34,11 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/snmp_structs.h"
|
||||
#include "lwip/mem.h"
|
||||
|
||||
|
||||
|
||||
/** .iso.org.dod.internet address prefix, @see snmp_iso_*() */
|
||||
const s32_t prefix[4] = {1, 3, 6, 1};
|
||||
|
||||
@ -1182,4 +1181,3 @@ snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret)
|
||||
}
|
||||
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
|
@ -34,19 +34,18 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/snmp_asn1.h"
|
||||
#include "lwip/snmp_msg.h"
|
||||
#include "lwip/snmp_structs.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* public (non-static) constants */
|
||||
/** SNMP v1 == 0 */
|
||||
|
@ -44,11 +44,10 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SNMP
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/snmp_asn1.h"
|
||||
#include "lwip/snmp_msg.h"
|
||||
|
@ -36,17 +36,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/def.h"
|
||||
#if LWIP_STATS /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/mem.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if LWIP_STATS
|
||||
struct stats_ lwip_stats;
|
||||
|
||||
void
|
||||
@ -141,5 +140,6 @@ stats_display(void)
|
||||
#endif
|
||||
}
|
||||
#endif /* LWIP_STATS_DISPLAY */
|
||||
|
||||
#endif /* LWIP_STATS */
|
||||
|
||||
|
@ -36,14 +36,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if (NO_SYS == 0) /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/tcpip.h"
|
||||
|
||||
#if (NO_SYS == 0)
|
||||
|
||||
/**
|
||||
* Struct used for sys_sem_wait_timeout() to tell wether the time
|
||||
* has run out or the semaphore has really become available.
|
||||
|
@ -40,16 +40,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#include "lwip/tcp.h"
|
||||
#if LWIP_TCP
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Incremented every coarse grained timer shot (typically every 500 ms). */
|
||||
u32_t tcp_ticks;
|
||||
@ -1322,4 +1323,5 @@ tcp_pcbs_sane(void)
|
||||
return 1;
|
||||
}
|
||||
#endif /* TCP_DEBUG */
|
||||
|
||||
#endif /* LWIP_TCP */
|
||||
|
@ -41,22 +41,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
#include "arch/perf.h"
|
||||
#include "lwip/snmp.h"
|
||||
#include "arch/perf.h"
|
||||
|
||||
#if LWIP_TCP
|
||||
/* These variables are global to all functions involved in the input
|
||||
processing of TCP segments. They are set by the tcp_input()
|
||||
function. */
|
||||
@ -1279,4 +1278,5 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* LWIP_TCP */
|
||||
|
@ -38,10 +38,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/sys.h"
|
||||
@ -52,7 +53,7 @@
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#if LWIP_TCP
|
||||
#include <string.h>
|
||||
|
||||
/* Forward declarations.*/
|
||||
static void tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb);
|
||||
|
@ -43,10 +43,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/inet.h"
|
||||
@ -54,14 +54,13 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/icmp.h"
|
||||
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include "arch/perf.h"
|
||||
#include "lwip/snmp.h"
|
||||
#include "arch/perf.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* The list of UDP PCBs */
|
||||
#if LWIP_UDP
|
||||
/* exported in udp.h (was static) */
|
||||
struct udp_pcb *udp_pcbs = NULL;
|
||||
|
||||
|
@ -45,6 +45,9 @@
|
||||
#define __LWIP_AUTOIP_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "netif/etharp.h"
|
||||
@ -97,4 +100,6 @@ void autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr);
|
||||
/** Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds */
|
||||
void autoip_tmr(void);
|
||||
|
||||
#endif /* LWIP_AUTOIP */
|
||||
|
||||
#endif /* __LWIP_AUTOIP_H__ */
|
||||
|
@ -32,16 +32,14 @@
|
||||
#ifndef __LWIP_ICMP_H__
|
||||
#define __LWIP_ICMP_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/pbuf.h"
|
||||
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -32,9 +32,8 @@
|
||||
#ifndef __LWIP_INET_H__
|
||||
#define __LWIP_INET_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
||||
|
@ -32,15 +32,13 @@
|
||||
#ifndef __LWIP_IP_H__
|
||||
#define __LWIP_IP_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
||||
#include "lwip/err.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef __LWIP_IP_ADDR_H__
|
||||
#define __LWIP_IP_ADDR_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -32,15 +32,13 @@
|
||||
#ifndef __LWIP_ICMP_H__
|
||||
#define __LWIP_ICMP_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/pbuf.h"
|
||||
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -32,8 +32,6 @@
|
||||
#ifndef __LWIP_INET_H__
|
||||
#define __LWIP_INET_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#ifndef __LWIP_IP_ADDR_H__
|
||||
#define __LWIP_IP_ADDR_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -33,16 +33,16 @@
|
||||
#define __LWIP_API_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/netbuf.h"
|
||||
#include "lwip/sys.h"
|
||||
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#include "lwip/raw.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -122,7 +122,7 @@ struct netconn {
|
||||
this temporarily stores whether to wake up the original application task
|
||||
if data couldn't be sent in the first try. */
|
||||
u8_t write_delayed;
|
||||
#endif
|
||||
#endif /* LWIP_TCPIP_CORE_LOCKING */
|
||||
|
||||
void (* callback)(struct netconn *, enum netconn_evt, u16_t len);
|
||||
};
|
||||
@ -174,4 +174,6 @@ err_t netconn_join_leave_group (struct netconn *conn,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_NETCONN */
|
||||
|
||||
#endif /* __LWIP_API_H__ */
|
||||
|
@ -33,14 +33,14 @@
|
||||
#define __LWIP_API_MSG_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/sys.h"
|
||||
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/tcp.h"
|
||||
|
||||
#include "lwip/api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -102,4 +102,6 @@ void do_join_leave_group( struct api_msg_msg *msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_NETCONN */
|
||||
|
||||
#endif /* __LWIP_API_MSG_H__ */
|
||||
|
@ -5,6 +5,9 @@
|
||||
#define __LWIP_DHCP_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/udp.h"
|
||||
|
||||
@ -236,4 +239,6 @@ void dhcp_fine_tmr(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_DHCP */
|
||||
|
||||
#endif /*__LWIP_DHCP_H__*/
|
||||
|
@ -33,7 +33,6 @@
|
||||
#define __LWIP_INIT_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -33,7 +33,6 @@
|
||||
#define __LWIP_MEM_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -29,13 +29,14 @@
|
||||
#define __LWIP_NETIFAPI_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lwip/autoip.h"
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@
|
||||
#ifndef __LWIP_PBUF_H__
|
||||
#define __LWIP_PBUF_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -32,7 +32,9 @@
|
||||
#ifndef __LWIP_RAW_H__
|
||||
#define __LWIP_RAW_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/inet.h"
|
||||
@ -89,4 +91,6 @@ void raw_init (void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_RAW */
|
||||
|
||||
#endif /* __LWIP_RAW_H__ */
|
||||
|
@ -79,8 +79,7 @@ enum snmp_ifType {
|
||||
snmp_ifType_frame_relay
|
||||
};
|
||||
|
||||
/* SNMP support available? */
|
||||
#if defined(LWIP_SNMP) && (LWIP_SNMP > 0)
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
/** fixed maximum length for object identifier type */
|
||||
#define LWIP_SNMP_OBJ_ID_LEN 32
|
||||
@ -350,7 +349,7 @@ void snmp_get_snmpenableauthentraps(u8_t *value);
|
||||
#define snmp_set_snmpenableauthentraps(value)
|
||||
#define snmp_get_snmpenableauthentraps(value)
|
||||
|
||||
#endif
|
||||
#endif /* LWIP_SNMP */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -94,4 +94,4 @@ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u8_t raw_len, u8_t *raw);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __LWIP_SNMP_ASN1_H__ */
|
||||
|
@ -304,4 +304,4 @@ void snmp_authfail_trap(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* __LWIP_SNMP_MSG_H__ */
|
||||
|
@ -38,7 +38,8 @@
|
||||
#define __LWIP_SNMP_STRUCTS_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
#if LWIP_SNMP
|
||||
|
||||
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
@ -257,4 +258,5 @@ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oi
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_SNMP */
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_SNMP_STRUCTS_H__ */
|
||||
|
@ -35,6 +35,9 @@
|
||||
#define __LWIP_SOCKETS_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/inet.h"
|
||||
|
||||
@ -327,4 +330,6 @@ int lwip_ioctl(int s, long cmd, void *argp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_SOCKET */
|
||||
|
||||
#endif /* __LWIP_SOCKETS_H__ */
|
||||
|
@ -32,14 +32,15 @@
|
||||
#ifndef __LWIP_TCP_H__
|
||||
#define __LWIP_TCP_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
/*#if LWIP_TCP*/ /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/mem.h"
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/icmp.h"
|
||||
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -591,4 +592,6 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*#endif*/ /* LWIP_TCP */
|
||||
|
||||
#endif /* __LWIP_TCP_H__ */
|
||||
|
@ -64,9 +64,7 @@ err_t tcpip_apimsg(struct api_msg *apimsg);
|
||||
err_t tcpip_apimsg_lock(struct api_msg *apimsg);
|
||||
#endif /* LWIP_TCPIP_CORE_LOCKING */
|
||||
|
||||
#if LWIP_ARP
|
||||
err_t tcpip_input(struct pbuf *p, struct netif *inp);
|
||||
#endif /* LWIP_ARP */
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
err_t tcpip_netifapi(struct netifapi_msg *netifapimsg);
|
||||
@ -81,9 +79,7 @@ err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
|
||||
|
||||
enum tcpip_msg_type {
|
||||
TCPIP_MSG_API,
|
||||
#if LWIP_ARP
|
||||
TCPIP_MSG_INPKT,
|
||||
#endif /* LWIP_ARP */
|
||||
#if LWIP_NETIF_API
|
||||
TCPIP_MSG_NETIFAPI,
|
||||
#endif /* LWIP_NETIF_API */
|
||||
@ -99,12 +95,10 @@ struct tcpip_msg {
|
||||
#if LWIP_NETIF_API
|
||||
struct netifapi_msg *netifapimsg;
|
||||
#endif /* LWIP_NETIF_API */
|
||||
#if LWIP_ARP
|
||||
struct {
|
||||
struct pbuf *p;
|
||||
struct netif *netif;
|
||||
} inp;
|
||||
#endif /* LWIP_ARP */
|
||||
struct {
|
||||
void (*f)(void *ctx);
|
||||
void *ctx;
|
||||
|
@ -32,7 +32,9 @@
|
||||
#ifndef __LWIP_UDP_H__
|
||||
#define __LWIP_UDP_H__
|
||||
|
||||
#include "lwip/arch.h"
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_UDP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/inet.h"
|
||||
@ -135,4 +137,6 @@ void udp_debug_print(struct udp_hdr *udphdr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_UDP */
|
||||
|
||||
#endif /* __LWIP_UDP_H__ */
|
||||
|
@ -36,6 +36,9 @@
|
||||
#define __NETIF_ETHARP_H__
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_ARP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
@ -136,7 +139,7 @@ struct etharp_q_entry {
|
||||
struct etharp_q_entry *next;
|
||||
struct pbuf *p;
|
||||
};
|
||||
#endif
|
||||
#endif /* ARP_QUEUEING */
|
||||
|
||||
void etharp_init(void);
|
||||
void etharp_tmr(void);
|
||||
@ -165,4 +168,6 @@ extern const struct eth_addr ethbroadcast, ethzero;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_ARP */
|
||||
|
||||
#endif /* __NETIF_ARP_H__ */
|
||||
|
@ -43,22 +43,19 @@
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#if LWIP_ARP /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/inet.h"
|
||||
#include "netif/etharp.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
/* ARP needs to inform DHCP of any ARP replies? */
|
||||
#if (LWIP_DHCP && DHCP_DOES_ARP_CHECK)
|
||||
# include "lwip/dhcp.h"
|
||||
#endif /* LWIP_DHCP && DHCP_DOES_ARP_CHECK */
|
||||
/* ARP needs to inform AUTOIP of any ARP replies? */
|
||||
#if (LWIP_AUTOIP)
|
||||
# include "lwip/autoip.h"
|
||||
#endif /* LWIP_AUTOIP */
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lwip/autoip.h"
|
||||
#include "netif/etharp.h"
|
||||
#include <string.h>
|
||||
|
||||
/** the time an ARP entry stays valid after its last update,
|
||||
* for ARP_TMR_INTERVAL = 5000, this is
|
||||
@ -1086,3 +1083,5 @@ etharp_request(struct netif *netif, struct ip_addr *ipaddr)
|
||||
(struct eth_addr *)netif->hwaddr, &netif->ip_addr, ðzero,
|
||||
ipaddr, ARP_REQUEST);
|
||||
}
|
||||
|
||||
#endif /* LWIP_ARP */
|
||||
|
Loading…
Reference in New Issue
Block a user