Commit d77666c0 authored by sergio's avatar sergio Committed by Terry Ellison
Browse files

trailing spaces cleanup (#2659)

parent d7583040
This diff is collapsed.
...@@ -24,7 +24,7 @@ STD_CFLAGS=-std=gnu11 -Wimplicit ...@@ -24,7 +24,7 @@ STD_CFLAGS=-std=gnu11 -Wimplicit
# makefile at its root level - these are then overridden # makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein # for a subtree within the makefile rooted therein
# #
#DEFINES += #DEFINES +=
############################################################# #############################################################
# Recursion Magic - Don't touch this!! # Recursion Magic - Don't touch this!!
......
...@@ -171,7 +171,7 @@ static void ICACHE_FLASH_ATTR http_send_callback( void * arg ) ...@@ -171,7 +171,7 @@ static void ICACHE_FLASH_ATTR http_send_callback( void * arg )
{ {
HTTPCLIENT_DEBUG( "All sent" ); HTTPCLIENT_DEBUG( "All sent" );
} }
else else
{ {
/* The headers were sent, now send the contents. */ /* The headers were sent, now send the contents. */
HTTPCLIENT_DEBUG( "Sending request body" ); HTTPCLIENT_DEBUG( "Sending request body" );
...@@ -324,7 +324,7 @@ static void ICACHE_FLASH_ATTR http_disconnect_callback( void * arg ) ...@@ -324,7 +324,7 @@ static void ICACHE_FLASH_ATTR http_disconnect_callback( void * arg )
{ {
HTTPCLIENT_ERR( "Invalid version in %s", req->buffer ); HTTPCLIENT_ERR( "Invalid version in %s", req->buffer );
} }
else else
{ {
http_status = atoi( req->buffer + strlen( version_1_0 ) ); http_status = atoi( req->buffer + strlen( version_1_0 ) );
...@@ -470,7 +470,7 @@ static void ICACHE_FLASH_ATTR http_timeout_callback( void *arg ) ...@@ -470,7 +470,7 @@ static void ICACHE_FLASH_ATTR http_timeout_callback( void *arg )
else else
#endif #endif
result = espconn_disconnect( conn ); result = espconn_disconnect( conn );
if (result == ESPCONN_OK || result == ESPCONN_INPROGRESS) if (result == ESPCONN_OK || result == ESPCONN_INPROGRESS)
return; return;
else else
...@@ -478,7 +478,7 @@ static void ICACHE_FLASH_ATTR http_timeout_callback( void *arg ) ...@@ -478,7 +478,7 @@ static void ICACHE_FLASH_ATTR http_timeout_callback( void *arg )
/* not connected; execute the callback ourselves. */ /* not connected; execute the callback ourselves. */
HTTPCLIENT_DEBUG( "manually Calling disconnect callback due to error %d", result ); HTTPCLIENT_DEBUG( "manually Calling disconnect callback due to error %d", result );
http_disconnect_callback( arg ); http_disconnect_callback( arg );
} }
} }
...@@ -502,7 +502,7 @@ static void ICACHE_FLASH_ATTR http_dns_callback( const char * hostname, ip_addr_ ...@@ -502,7 +502,7 @@ static void ICACHE_FLASH_ATTR http_dns_callback( const char * hostname, ip_addr_
} }
http_free_req( req ); http_free_req( req );
} }
else else
{ {
HTTPCLIENT_DEBUG( "DNS found %s " IPSTR, hostname, IP2STR( addr ) ); HTTPCLIENT_DEBUG( "DNS found %s " IPSTR, hostname, IP2STR( addr ) );
...@@ -531,8 +531,8 @@ static void ICACHE_FLASH_ATTR http_dns_callback( const char * hostname, ip_addr_ ...@@ -531,8 +531,8 @@ static void ICACHE_FLASH_ATTR http_dns_callback( const char * hostname, ip_addr_
if ( req->secure ) if ( req->secure )
{ {
espconn_secure_connect( conn ); espconn_secure_connect( conn );
} }
else else
#endif #endif
{ {
espconn_connect( conn ); espconn_connect( conn );
...@@ -575,7 +575,7 @@ void ICACHE_FLASH_ATTR http_raw_request( const char * hostname, int port, bool s ...@@ -575,7 +575,7 @@ void ICACHE_FLASH_ATTR http_raw_request( const char * hostname, int port, bool s
/* Already in the local names table (or hostname was an IP address), execute the callback ourselves. */ /* Already in the local names table (or hostname was an IP address), execute the callback ourselves. */
http_dns_callback( hostname, &addr, req ); http_dns_callback( hostname, &addr, req );
} }
else else
{ {
if ( error == ESPCONN_ARG ) if ( error == ESPCONN_ARG )
{ {
...@@ -614,8 +614,8 @@ void ICACHE_FLASH_ATTR http_request( const char * url, const char * method, cons ...@@ -614,8 +614,8 @@ void ICACHE_FLASH_ATTR http_request( const char * url, const char * method, cons
port = 443; port = 443;
secure = true; secure = true;
url += strlen( "https://" ); /* Get rid of the protocol. */ url += strlen( "https://" ); /* Get rid of the protocol. */
} }
else else
{ {
HTTPCLIENT_ERR( "URL is not HTTP or HTTPS %s", url ); HTTPCLIENT_ERR( "URL is not HTTP or HTTPS %s", url );
return; return;
...@@ -643,7 +643,7 @@ void ICACHE_FLASH_ATTR http_request( const char * url, const char * method, cons ...@@ -643,7 +643,7 @@ void ICACHE_FLASH_ATTR http_request( const char * url, const char * method, cons
os_memcpy( hostname, url, path - url ); os_memcpy( hostname, url, path - url );
hostname[path - url] = '\0'; hostname[path - url] = '\0';
} }
else else
{ {
port = atoi( colon + 1 ); port = atoi( colon + 1 );
if ( port == 0 ) if ( port == 0 )
......
/* /*
* Copyright (c) 2001, Swedish Institute of Computer Science. * Copyright (c) 2001, Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors * 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * 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 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
......
/* /*
* Copyright (c) 2001, Swedish Institute of Computer Science. * Copyright (c) 2001, Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* 1. Redistributions of source code must retain the above copyright * 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors * 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * 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 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
......
...@@ -47,7 +47,7 @@ void spi_byte_read_espslave(uint8 spi_no,uint8 *data); ...@@ -47,7 +47,7 @@ void spi_byte_read_espslave(uint8 spi_no,uint8 *data);
void spi_slave_init(uint8 spi_no); void spi_slave_init(uint8 spi_no);
//esp8266 slave isr handle funtion,tiggered when any transmission is finished. //esp8266 slave isr handle funtion,tiggered when any transmission is finished.
//the function is registered in spi_slave_init. //the function is registered in spi_slave_init.
void spi_slave_isr_handler(void *para); void spi_slave_isr_handler(void *para);
//hspi test function, used to test esp8266 spi slave //hspi test function, used to test esp8266 spi slave
......
...@@ -106,7 +106,7 @@ typedef struct { ...@@ -106,7 +106,7 @@ typedef struct {
UartBautRate baut_rate; UartBautRate baut_rate;
UartBitsNum4Char data_bits; UartBitsNum4Char data_bits;
UartExistParity exist_parity; UartExistParity exist_parity;
UartParityMode parity; UartParityMode parity;
UartStopBitsNum stop_bits; UartStopBitsNum stop_bits;
} UartConfig; } UartConfig;
......
/* /*
* Copyright (c) 2001-2004 Swedish Institute of Computer Science. * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * 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 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE. * OF SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
......
/* /*
* Copyright (c) 2001-2004 Swedish Institute of Computer Science. * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * 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 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE. * OF SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
......
#ifndef __DHCPS_H__ #ifndef __DHCPS_H__
#define __DHCPS_H__ #define __DHCPS_H__
#include "lwipopts.h" #include "lwipopts.h"
#define USE_DNS #define USE_DNS
typedef struct dhcps_state{ typedef struct dhcps_state{
sint16_t state; sint16_t state;
} dhcps_state; } dhcps_state;
// ����dhcpclient�Զ����һ��DHCP msg�ṹ�� // ����dhcpclient�Զ����һ��DHCP msg�ṹ��
typedef struct dhcps_msg { typedef struct dhcps_msg {
uint8_t op, htype, hlen, hops; uint8_t op, htype, hlen, hops;
uint8_t xid[4]; uint8_t xid[4];
uint16_t secs, flags; uint16_t secs, flags;
uint8_t ciaddr[4]; uint8_t ciaddr[4];
uint8_t yiaddr[4]; uint8_t yiaddr[4];
uint8_t siaddr[4]; uint8_t siaddr[4];
uint8_t giaddr[4]; uint8_t giaddr[4];
uint8_t chaddr[16]; uint8_t chaddr[16];
uint8_t sname[64]; uint8_t sname[64];
uint8_t file[128]; uint8_t file[128];
uint8_t options[312]; uint8_t options[312];
}dhcps_msg; }dhcps_msg;
#ifndef LWIP_OPEN_SRC #ifndef LWIP_OPEN_SRC
struct dhcps_lease { struct dhcps_lease {
bool enable; bool enable;
struct ip_addr start_ip; struct ip_addr start_ip;
struct ip_addr end_ip; struct ip_addr end_ip;
}; };
enum dhcps_offer_option{ enum dhcps_offer_option{
OFFER_START = 0x00, OFFER_START = 0x00,
OFFER_ROUTER = 0x01, OFFER_ROUTER = 0x01,
OFFER_END OFFER_END
}; };
#endif #endif
typedef enum { typedef enum {
DHCPS_TYPE_DYNAMIC, DHCPS_TYPE_DYNAMIC,
DHCPS_TYPE_STATIC DHCPS_TYPE_STATIC
} dhcps_type_t; } dhcps_type_t;
typedef enum { typedef enum {
DHCPS_STATE_ONLINE, DHCPS_STATE_ONLINE,
DHCPS_STATE_OFFLINE DHCPS_STATE_OFFLINE
} dhcps_state_t; } dhcps_state_t;
struct dhcps_pool{ struct dhcps_pool{
struct ip_addr ip; struct ip_addr ip;
uint8 mac[6]; uint8 mac[6];
uint32 lease_timer; uint32 lease_timer;
dhcps_type_t type; dhcps_type_t type;
dhcps_state_t state; dhcps_state_t state;
}; };
typedef struct _list_node{ typedef struct _list_node{
void *pnode; void *pnode;
struct _list_node *pnext; struct _list_node *pnext;
}list_node; }list_node;
extern uint32 dhcps_lease_time; extern uint32 dhcps_lease_time;
#define DHCPS_LEASE_TIMER dhcps_lease_time //0x05A0 #define DHCPS_LEASE_TIMER dhcps_lease_time //0x05A0
#define DHCPS_MAX_LEASE 0x64 #define DHCPS_MAX_LEASE 0x64
#define BOOTP_BROADCAST 0x8000 #define BOOTP_BROADCAST 0x8000
#define DHCP_REQUEST 1 #define DHCP_REQUEST 1
#define DHCP_REPLY 2 #define DHCP_REPLY 2
#define DHCP_HTYPE_ETHERNET 1 #define DHCP_HTYPE_ETHERNET 1
#define DHCP_HLEN_ETHERNET 6 #define DHCP_HLEN_ETHERNET 6
#define DHCP_MSG_LEN 236 #define DHCP_MSG_LEN 236
#define DHCPS_SERVER_PORT 67 #define DHCPS_SERVER_PORT 67
#define DHCPS_CLIENT_PORT 68 #define DHCPS_CLIENT_PORT 68
#define DHCPDISCOVER 1 #define DHCPDISCOVER 1
#define DHCPOFFER 2 #define DHCPOFFER 2
#define DHCPREQUEST 3 #define DHCPREQUEST 3
#define DHCPDECLINE 4 #define DHCPDECLINE 4
#define DHCPACK 5 #define DHCPACK 5
#define DHCPNAK 6 #define DHCPNAK 6
#define DHCPRELEASE 7 #define DHCPRELEASE 7
#define DHCP_OPTION_SUBNET_MASK 1 #define DHCP_OPTION_SUBNET_MASK 1
#define DHCP_OPTION_ROUTER 3 #define DHCP_OPTION_ROUTER 3
#define DHCP_OPTION_DNS_SERVER 6 #define DHCP_OPTION_DNS_SERVER 6
#define DHCP_OPTION_REQ_IPADDR 50 #define DHCP_OPTION_REQ_IPADDR 50
#define DHCP_OPTION_LEASE_TIME 51 #define DHCP_OPTION_LEASE_TIME 51
#define DHCP_OPTION_MSG_TYPE 53 #define DHCP_OPTION_MSG_TYPE 53
#define DHCP_OPTION_SERVER_ID 54 #define DHCP_OPTION_SERVER_ID 54
#define DHCP_OPTION_INTERFACE_MTU 26 #define DHCP_OPTION_INTERFACE_MTU 26
#define DHCP_OPTION_PERFORM_ROUTER_DISCOVERY 31 #define DHCP_OPTION_PERFORM_ROUTER_DISCOVERY 31
#define DHCP_OPTION_BROADCAST_ADDRESS 28 #define DHCP_OPTION_BROADCAST_ADDRESS 28
#define DHCP_OPTION_REQ_LIST 55 #define DHCP_OPTION_REQ_LIST 55
#define DHCP_OPTION_END 255 #define DHCP_OPTION_END 255
//#define USE_CLASS_B_NET 1 //#define USE_CLASS_B_NET 1
#define DHCPS_DEBUG 0 #define DHCPS_DEBUG 0
#define MAX_STATION_NUM 8 #define MAX_STATION_NUM 8
#define DHCPS_STATE_OFFER 1 #define DHCPS_STATE_OFFER 1
#define DHCPS_STATE_DECLINE 2 #define DHCPS_STATE_DECLINE 2
#define DHCPS_STATE_ACK 3 #define DHCPS_STATE_ACK 3
#define DHCPS_STATE_NAK 4 #define DHCPS_STATE_NAK 4
#define DHCPS_STATE_IDLE 5 #define DHCPS_STATE_IDLE 5
#define DHCPS_STATE_RELEASE 6 #define DHCPS_STATE_RELEASE 6
#define dhcps_router_enabled(offer) ((offer & OFFER_ROUTER) != 0) #define dhcps_router_enabled(offer) ((offer & OFFER_ROUTER) != 0)
void dhcps_start(struct ip_info *info); void dhcps_start(struct ip_info *info);
void dhcps_stop(void); void dhcps_stop(void);
#endif #endif
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#if 0 #if 0
#define espconn_printf(fmt, args...) os_printf(fmt,## args) #define espconn_printf(fmt, args...) os_printf(fmt,## args)
#else #else
#define espconn_printf(fmt, args...) #define espconn_printf(fmt, args...)
#endif #endif
...@@ -468,7 +468,7 @@ extern sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8 ...@@ -468,7 +468,7 @@ extern sint8 espconn_regist_time(struct espconn *espconn, uint32 interval, uint8
* Description : Used to specify the function that should be called when data * Description : Used to specify the function that should be called when data
* has been successfully delivered to the remote host. * has been successfully delivered to the remote host.
* Parameters : struct espconn *espconn -- espconn to set the sent callback * Parameters : struct espconn *espconn -- espconn to set the sent callback
* espconn_sent_callback sent_cb -- sent callback function to * espconn_sent_callback sent_cb -- sent callback function to
* call for this espconn when data is successfully sent * call for this espconn when data is successfully sent
* Returns : none * Returns : none
*******************************************************************************/ *******************************************************************************/
...@@ -510,10 +510,10 @@ extern sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length); ...@@ -510,10 +510,10 @@ extern sint8 espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length);
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_regist_connectcb * FunctionName : espconn_regist_connectcb
* Description : used to specify the function that should be called when * Description : used to specify the function that should be called when
* connects to host. * connects to host.
* Parameters : espconn -- espconn to set the connect callback * Parameters : espconn -- espconn to set the connect callback
* connect_cb -- connected callback function to call when connected * connect_cb -- connected callback function to call when connected
* Returns : none * Returns : none
*******************************************************************************/ *******************************************************************************/
...@@ -521,9 +521,9 @@ extern sint8 espconn_regist_connectcb(struct espconn *espconn, espconn_connect_c ...@@ -521,9 +521,9 @@ extern sint8 espconn_regist_connectcb(struct espconn *espconn, espconn_connect_c
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_regist_recvcb * FunctionName : espconn_regist_recvcb
* Description : used to specify the function that should be called when recv * Description : used to specify the function that should be called when recv
* data from host. * data from host.
* Parameters : espconn -- espconn to set the recv callback * Parameters : espconn -- espconn to set the recv callback
* recv_cb -- recv callback function to call when recv data * recv_cb -- recv callback function to call when recv data
* Returns : none * Returns : none
*******************************************************************************/ *******************************************************************************/
...@@ -532,10 +532,10 @@ extern sint8 espconn_regist_recvcb(struct espconn *espconn, espconn_recv_callbac ...@@ -532,10 +532,10 @@ extern sint8 espconn_regist_recvcb(struct espconn *espconn, espconn_recv_callbac
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_regist_reconcb * FunctionName : espconn_regist_reconcb
* Description : used to specify the function that should be called when connection * Description : used to specify the function that should be called when connection
* because of err disconnect. * because of err disconnect.
* Parameters : espconn -- espconn to set the err callback * Parameters : espconn -- espconn to set the err callback
* recon_cb -- err callback function to call when err * recon_cb -- err callback function to call when err
* Returns : none * Returns : none
*******************************************************************************/ *******************************************************************************/
...@@ -596,7 +596,7 @@ extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *o ...@@ -596,7 +596,7 @@ extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *o
* Description : Resolve a hostname (string) into an IP address. * Description : Resolve a hostname (string) into an IP address.
* Parameters : pespconn -- espconn to resolve a hostname * Parameters : pespconn -- espconn to resolve a hostname
* hostname -- the hostname that is to be queried * hostname -- the hostname that is to be queried
* addr -- pointer to a ip_addr_t where to store the address if * addr -- pointer to a ip_addr_t where to store the address if
* it is already cached in the dns_table (only valid if * it is already cached in the dns_table (only valid if
* ESPCONN_OK is returned!) * ESPCONN_OK is returned!)
* found -- a callback function to be called on success, failure * found -- a callback function to be called on success, failure
......
This diff is collapsed.
This diff is collapsed.
/* /*
* Copyright (c) 2001-2004 Swedish Institute of Computer Science. * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * 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 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE. * OF SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
...@@ -71,7 +71,7 @@ extern "C" { ...@@ -71,7 +71,7 @@ extern "C" {
#ifndef LWIP_UNUSED_ARG #ifndef LWIP_UNUSED_ARG
#define LWIP_UNUSED_ARG(x) (void)x #define LWIP_UNUSED_ARG(x) (void)x
#endif /* LWIP_UNUSED_ARG */ #endif /* LWIP_UNUSED_ARG */
#ifdef LWIP_PROVIDE_ERRNO #ifdef LWIP_PROVIDE_ERRNO
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
* Please coordinate changes and requests with Dominik Spies * Please coordinate changes and requests with Dominik Spies
* <kontakt@dspies.de> * <kontakt@dspies.de>
*/ */
#ifndef __LWIP_AUTOIP_H__ #ifndef __LWIP_AUTOIP_H__
#define __LWIP_AUTOIP_H__ #define __LWIP_AUTOIP_H__
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/** /**
* lwip DNS resolver header file. * lwip DNS resolver header file.
* Author: Jim Pettinato * Author: Jim Pettinato
* April 2007 * April 2007
* ported from uIP resolv.c Copyright (c) 2002-2003, Adam Dunkels. * ported from uIP resolv.c Copyright (c) 2002-2003, Adam Dunkels.
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment