mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
Merge branch 'master' into ppp-new
This commit is contained in:
@@ -222,11 +222,12 @@ recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
|
||||
LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL);
|
||||
LWIP_ASSERT("recv_tcp must have an argument", arg != NULL);
|
||||
conn = (struct netconn *)arg;
|
||||
LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
|
||||
|
||||
if (conn == NULL) {
|
||||
return ERR_VAL;
|
||||
}
|
||||
LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb);
|
||||
|
||||
if (!sys_mbox_valid(&conn->recvmbox)) {
|
||||
/* recvmbox already deleted */
|
||||
if (p != NULL) {
|
||||
|
||||
@@ -701,7 +701,7 @@ igmp_start_timer(struct igmp_group *group, u8_t max_time)
|
||||
}
|
||||
#ifdef LWIP_RAND
|
||||
/* ensure the random value is > 0 */
|
||||
group->timer = (LWIP_RAND() % (max_time - 1)) + 1;
|
||||
group->timer = (LWIP_RAND() % max_time);
|
||||
#endif /* LWIP_RAND */
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/nd6.h"
|
||||
#include "lwip/mld6.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "lwip/ip6.h"
|
||||
#include "lwip/icmp6.h"
|
||||
#include "lwip/nd6.h"
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "lwip/icmp6.h"
|
||||
#include "lwip/ip6.h"
|
||||
#include "lwip/ip6_addr.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/inet_chksum.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/icmp6.h"
|
||||
#include "lwip/mld6.h"
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/stats.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -719,7 +719,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p,
|
||||
for (last = r; last->next != NULL; last = last->next);
|
||||
|
||||
SYS_ARCH_PROTECT(lev);
|
||||
if(netif->loop_first != NULL) {
|
||||
if (netif->loop_first != NULL) {
|
||||
LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL);
|
||||
netif->loop_last->next = r;
|
||||
netif->loop_last = last;
|
||||
@@ -735,7 +735,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p,
|
||||
|
||||
#if LWIP_NETIF_LOOPBACK_MULTITHREADING
|
||||
/* For multithreading environment, schedule a call to netif_poll */
|
||||
tcpip_callback((tcpip_callback_fn)netif_poll, netif);
|
||||
tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0);
|
||||
#endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */
|
||||
|
||||
return ERR_OK;
|
||||
|
||||
@@ -1377,9 +1377,9 @@ void
|
||||
tcp_keepalive(struct tcp_pcb *pcb)
|
||||
{
|
||||
struct pbuf *p;
|
||||
#if CHECKSUM_GEN_TCP
|
||||
#if CHECKSUM_GEN_TCP
|
||||
struct tcp_hdr *tcphdr;
|
||||
#endif /* CHECKSUM_GEN_TCP */
|
||||
#endif /* CHECKSUM_GEN_TCP */
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: sending KEEPALIVE probe to "));
|
||||
ipX_addr_debug_print(PCB_ISIPV6(pcb), TCP_DEBUG, &pcb->remote_ip);
|
||||
@@ -1394,12 +1394,12 @@ tcp_keepalive(struct tcp_pcb *pcb)
|
||||
("tcp_keepalive: could not allocate memory for pbuf\n"));
|
||||
return;
|
||||
}
|
||||
#if CHECKSUM_GEN_TCP
|
||||
#if CHECKSUM_GEN_TCP
|
||||
tcphdr = (struct tcp_hdr *)p->payload;
|
||||
|
||||
tcphdr->chksum = ipX_chksum_pseudo(PCB_ISIPV6(pcb), p, IP_PROTO_TCP, p->tot_len,
|
||||
&pcb->local_ip, &pcb->remote_ip);
|
||||
#endif /* CHECKSUM_GEN_TCP */
|
||||
#endif /* CHECKSUM_GEN_TCP */
|
||||
TCP_STATS_INC(tcp.xmit);
|
||||
|
||||
/* Send output to IP */
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#include "lwip/ip.h"
|
||||
//#include "lwip/ip.h"
|
||||
#include "lwip/ip6_addr.h"
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/pbuf.h"
|
||||
|
||||
@@ -233,7 +233,7 @@ struct tcp_pcb {
|
||||
|
||||
u16_t snd_buf; /* Available buffer space for sending (in bytes). */
|
||||
#define TCP_SNDQUEUELEN_OVERFLOW (0xffffU-3)
|
||||
u16_t snd_queuelen; /* Available buffer space for sending (in tcp_segs). */
|
||||
u16_t snd_queuelen; /* Available buffer space for sending (in pbufs). */
|
||||
|
||||
#if TCP_OVERSIZE
|
||||
/* Extra bytes available at the end of the last pbuf in unsent. */
|
||||
|
||||
Reference in New Issue
Block a user