mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Partially accepted patch #5449 for ANSI C compatibility / build fixes. Fixed bug #17574 corrected UDP-Lite protocol identifier.
This commit is contained in:
parent
729da3c873
commit
b5f4672155
@ -56,6 +56,12 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2006-10-11 Christiaan Simons
|
||||
* api_lib.c etharp.c, ip.c, memp.c, stats.c, sys.{c,h} tcp.h:
|
||||
Partially accepted patch #5449 for ANSI C compatibility / build fixes.
|
||||
* ipv4/lwip/ip.h ipv6/lwip/ip.h: Corrected UDP-Lite protocol
|
||||
identifier from 170 to 136 (bug #17574).
|
||||
|
||||
2006-10-10 Christiaan Simons
|
||||
* api_msg.c: Fixed Nagle algorithm as reported by Bob Grice.
|
||||
|
||||
|
@ -489,7 +489,7 @@ netconn_accept(struct netconn *conn)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sys_mbox_fetch(conn->acceptmbox, (void **)&newconn);
|
||||
sys_mbox_fetch(conn->acceptmbox, (void *)&newconn);
|
||||
/* Register event with callback */
|
||||
if (conn->callback)
|
||||
(*conn->callback)(conn, NETCONN_EVT_RCVMINUS, 0);
|
||||
@ -532,7 +532,7 @@ netconn_recv(struct netconn *conn)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sys_mbox_fetch(conn->recvmbox, (void **)&p);
|
||||
sys_mbox_fetch(conn->recvmbox, (void *)&p);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
@ -577,7 +577,7 @@ netconn_recv(struct netconn *conn)
|
||||
sys_mbox_fetch(conn->mbox, NULL);
|
||||
memp_free(MEMP_API_MSG, msg);
|
||||
} else {
|
||||
sys_mbox_fetch(conn->recvmbox, (void **)&buf);
|
||||
sys_mbox_fetch(conn->recvmbox, (void *)&buf);
|
||||
conn->recv_avail -= buf->p->tot_len;
|
||||
/* Register event with callback */
|
||||
if (conn->callback)
|
||||
|
@ -304,7 +304,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
|
||||
IP_STATS_INC(ip.opterr);
|
||||
IP_STATS_INC(ip.drop);
|
||||
/* unsupported protocol feature */
|
||||
snmp_inc_ipunknownprotos();
|
||||
snmp_inc_ipinunknownprotos();
|
||||
return ERR_OK;
|
||||
#endif /* IP_REASSEMBLY */
|
||||
}
|
||||
@ -316,7 +316,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
|
||||
IP_STATS_INC(ip.opterr);
|
||||
IP_STATS_INC(ip.drop);
|
||||
/* unsupported protocol feature */
|
||||
snmp_inc_ipunknownprotos();
|
||||
snmp_inc_ipinunknownprotos();
|
||||
return ERR_OK;
|
||||
}
|
||||
#endif /* IP_OPTIONS == 0 */
|
||||
|
@ -64,7 +64,7 @@ static const u16_t memp_sizes[MEMP_MAX] = {
|
||||
MEM_ALIGN_SIZE(sizeof(struct netconn)),
|
||||
MEM_ALIGN_SIZE(sizeof(struct api_msg)),
|
||||
MEM_ALIGN_SIZE(sizeof(struct tcpip_msg)),
|
||||
MEM_ALIGN_SIZE(sizeof(struct sys_timeout))
|
||||
MEM_ALIGN_SIZE(sizeof(struct sys_timeo))
|
||||
};
|
||||
|
||||
static const u16_t memp_num[MEMP_MAX] = {
|
||||
@ -95,7 +95,7 @@ static u8_t memp_memory[MEM_ALIGNMENT - 1 +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_NETCONN, struct netconn) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_API_MSG, struct api_msg) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_TCPIP_MSG, struct tcpip_msg) +
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_SYS_TIMEOUT, struct sys_timeout)];
|
||||
MEMP_TYPE_SIZE(MEMP_NUM_SYS_TIMEOUT, struct sys_timeo)];
|
||||
|
||||
#if !SYS_LIGHTWEIGHT_PROT
|
||||
static sys_sem_t mutex;
|
||||
|
@ -84,10 +84,10 @@ void
|
||||
stats_display_mem(struct stats_mem *mem, char *name)
|
||||
{
|
||||
LWIP_PLATFORM_DIAG(("\n MEM %s\n\t", name));
|
||||
LWIP_PLATFORM_DIAG(("avail: %"S16_F"\n\t", mem->avail));
|
||||
LWIP_PLATFORM_DIAG(("used: %"S16_F"\n\t", mem->used));
|
||||
LWIP_PLATFORM_DIAG(("max: %"S16_F"\n\t", mem->max));
|
||||
LWIP_PLATFORM_DIAG(("err: %"S16_F"\n", mem->err));
|
||||
LWIP_PLATFORM_DIAG(("avail: %"MEM_SIZE_F"\n\t", mem->avail));
|
||||
LWIP_PLATFORM_DIAG(("used: %"MEM_SIZE_F"\n\t", mem->used));
|
||||
LWIP_PLATFORM_DIAG(("max: %"MEM_SIZE_F"\n\t", mem->max));
|
||||
LWIP_PLATFORM_DIAG(("err: %"MEM_SIZE_F"\n", mem->err));
|
||||
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ sys_mbox_fetch(sys_mbox_t mbox, void **msg)
|
||||
{
|
||||
u32_t time;
|
||||
struct sys_timeouts *timeouts;
|
||||
struct sys_timeout *tmptimeout;
|
||||
struct sys_timeo *tmptimeout;
|
||||
sys_timeout_handler h;
|
||||
void *arg;
|
||||
|
||||
@ -102,7 +102,7 @@ sys_sem_wait(sys_sem_t sem)
|
||||
{
|
||||
u32_t time;
|
||||
struct sys_timeouts *timeouts;
|
||||
struct sys_timeout *tmptimeout;
|
||||
struct sys_timeo *tmptimeout;
|
||||
sys_timeout_handler h;
|
||||
void *arg;
|
||||
|
||||
@ -157,7 +157,7 @@ void
|
||||
sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg)
|
||||
{
|
||||
struct sys_timeouts *timeouts;
|
||||
struct sys_timeout *timeout, *t;
|
||||
struct sys_timeo *timeout, *t;
|
||||
|
||||
timeout = memp_malloc(MEMP_SYS_TIMEOUT);
|
||||
if (timeout == NULL) {
|
||||
@ -208,7 +208,7 @@ void
|
||||
sys_untimeout(sys_timeout_handler h, void *arg)
|
||||
{
|
||||
struct sys_timeouts *timeouts;
|
||||
struct sys_timeout *prev_t, *t;
|
||||
struct sys_timeo *prev_t, *t;
|
||||
|
||||
timeouts = sys_arch_timeouts();
|
||||
|
||||
|
@ -54,7 +54,7 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
|
||||
|
||||
#define IP_PROTO_ICMP 1
|
||||
#define IP_PROTO_UDP 17
|
||||
#define IP_PROTO_UDPLITE 170
|
||||
#define IP_PROTO_UDPLITE 136
|
||||
#define IP_PROTO_TCP 6
|
||||
|
||||
/* This is passed as the destination address to ip_output_if (not
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#define IP_PROTO_ICMP 58
|
||||
#define IP_PROTO_UDP 17
|
||||
#define IP_PROTO_UDPLITE 170
|
||||
#define IP_PROTO_UDPLITE 136
|
||||
#define IP_PROTO_TCP 6
|
||||
|
||||
/* This is passed as the destination address to ip_output_if (not
|
||||
|
@ -43,7 +43,7 @@
|
||||
definitions of the sys_ functions. */
|
||||
typedef u8_t sys_sem_t;
|
||||
typedef u8_t sys_mbox_t;
|
||||
struct sys_timeout {u8_t dummy;};
|
||||
struct sys_timeo {u8_t dummy;};
|
||||
|
||||
#define sys_init()
|
||||
#define sys_timeout(m,h,a)
|
||||
@ -68,15 +68,15 @@ struct sys_timeout {u8_t dummy;};
|
||||
|
||||
typedef void (* sys_timeout_handler)(void *arg);
|
||||
|
||||
struct sys_timeout {
|
||||
struct sys_timeout *next;
|
||||
struct sys_timeo {
|
||||
struct sys_timeo *next;
|
||||
u32_t time;
|
||||
sys_timeout_handler h;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct sys_timeouts {
|
||||
struct sys_timeout *next;
|
||||
struct sys_timeo *next;
|
||||
};
|
||||
|
||||
/* sys_init() must be called before anthing else. */
|
||||
|
@ -150,7 +150,7 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
|
||||
#define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */
|
||||
#define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */
|
||||
|
||||
#define TCP_OOSEQ_TIMEOUT 6 /* x RTO */
|
||||
#define TCP_OOSEQ_TIMEOUT 6U /* x RTO */
|
||||
|
||||
#define TCP_MSL 60000 /* The maximum segment lifetime in microseconds */
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
* This file is part of the lwIP TCP/IP stack.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "netif/etharp.h"
|
||||
@ -366,7 +366,8 @@ static s8_t find_entry(struct ip_addr *ipaddr, u8_t flags)
|
||||
static err_t
|
||||
update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *ethaddr, u8_t flags)
|
||||
{
|
||||
s8_t i, k;
|
||||
s8_t i;
|
||||
u8_t k;
|
||||
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE | 3, ("update_arp_entry()\n"));
|
||||
LWIP_ASSERT("netif->hwaddr_len != 0", netif->hwaddr_len != 0);
|
||||
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n",
|
||||
|
Loading…
Reference in New Issue
Block a user