mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-06 22:44:38 +08:00
Fixed compiling with LWIP_TCP==0
This commit is contained in:
parent
ecf9d25ed0
commit
98b9d31f24
@ -721,11 +721,13 @@ netconn_close_shutdown(struct netconn *conn, u8_t how)
|
|||||||
{
|
{
|
||||||
API_MSG_VAR_DECLARE(msg);
|
API_MSG_VAR_DECLARE(msg);
|
||||||
err_t err;
|
err_t err;
|
||||||
|
LWIP_UNUSED_ARG(how);
|
||||||
|
|
||||||
LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
|
LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;);
|
||||||
|
|
||||||
API_MSG_VAR_ALLOC(msg);
|
API_MSG_VAR_ALLOC(msg);
|
||||||
API_MSG_VAR_REF(msg).msg.conn = conn;
|
API_MSG_VAR_REF(msg).msg.conn = conn;
|
||||||
|
#if LWIP_TCP
|
||||||
/* shutting down both ends is the same as closing */
|
/* shutting down both ends is the same as closing */
|
||||||
API_MSG_VAR_REF(msg).msg.msg.sd.shut = how;
|
API_MSG_VAR_REF(msg).msg.msg.sd.shut = how;
|
||||||
#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
|
#if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER
|
||||||
@ -736,6 +738,7 @@ netconn_close_shutdown(struct netconn *conn, u8_t how)
|
|||||||
API_MSG_VAR_REF(msg).msg.msg.sd.polls_left =
|
API_MSG_VAR_REF(msg).msg.msg.sd.polls_left =
|
||||||
((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
|
((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1;
|
||||||
#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
|
#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
|
||||||
|
#endif /* LWIP_TCP */
|
||||||
TCPIP_APIMSG(&API_MSG_VAR_REF(msg), lwip_netconn_do_close, err);
|
TCPIP_APIMSG(&API_MSG_VAR_REF(msg), lwip_netconn_do_close, err);
|
||||||
API_MSG_VAR_FREE(msg);
|
API_MSG_VAR_FREE(msg);
|
||||||
|
|
||||||
|
@ -508,7 +508,6 @@ static err_t
|
|||||||
tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err)
|
tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err)
|
||||||
{
|
{
|
||||||
LWIP_UNUSED_ARG(arg);
|
LWIP_UNUSED_ARG(arg);
|
||||||
LWIP_UNUSED_ARG(pcb);
|
|
||||||
LWIP_UNUSED_ARG(err);
|
LWIP_UNUSED_ARG(err);
|
||||||
|
|
||||||
tcp_abort(pcb);
|
tcp_abort(pcb);
|
||||||
|
@ -118,6 +118,7 @@ struct api_msg_msg {
|
|||||||
struct {
|
struct {
|
||||||
u32_t len;
|
u32_t len;
|
||||||
} r;
|
} r;
|
||||||
|
#if LWIP_TCP
|
||||||
/** used for lwip_netconn_do_close (/shutdown) */
|
/** used for lwip_netconn_do_close (/shutdown) */
|
||||||
struct {
|
struct {
|
||||||
u8_t shut;
|
u8_t shut;
|
||||||
@ -127,6 +128,7 @@ struct api_msg_msg {
|
|||||||
u8_t polls_left;
|
u8_t polls_left;
|
||||||
#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
|
#endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */
|
||||||
} sd;
|
} sd;
|
||||||
|
#endif /* LWIP_TCP */
|
||||||
#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD)
|
#if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD)
|
||||||
/** used for lwip_netconn_do_join_leave_group */
|
/** used for lwip_netconn_do_join_leave_group */
|
||||||
struct {
|
struct {
|
||||||
|
@ -480,7 +480,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
|
|||||||
}
|
}
|
||||||
#endif /* MPPE_SUPPORT */
|
#endif /* MPPE_SUPPORT */
|
||||||
|
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT && LWIP_TCP
|
||||||
/*
|
/*
|
||||||
* Attempt Van Jacobson header compression if VJ is configured and
|
* Attempt Van Jacobson header compression if VJ is configured and
|
||||||
* this is an IP packet.
|
* this is an IP packet.
|
||||||
@ -505,7 +505,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
|
|||||||
return ERR_VAL;
|
return ERR_VAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT && LWIP_TCP */
|
||||||
|
|
||||||
#if CCP_SUPPORT
|
#if CCP_SUPPORT
|
||||||
if (pcb->ccp_is_up) {
|
if (pcb->ccp_is_up) {
|
||||||
@ -665,9 +665,9 @@ void ppp_clear(ppp_pcb *pcb) {
|
|||||||
(*protp->init)(pcb);
|
(*protp->init)(pcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT && LWIP_TCP
|
||||||
vj_compress_init(&pcb->vj_comp);
|
vj_compress_init(&pcb->vj_comp);
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT && LWIP_TCP */
|
||||||
|
|
||||||
new_phase(pcb, PPP_PHASE_INITIALIZE);
|
new_phase(pcb, PPP_PHASE_INITIALIZE);
|
||||||
}
|
}
|
||||||
@ -822,7 +822,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
|||||||
return;
|
return;
|
||||||
#endif /* PPP_IPV6_SUPPORT */
|
#endif /* PPP_IPV6_SUPPORT */
|
||||||
|
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT && LWIP_TCP
|
||||||
case PPP_VJC_COMP: /* VJ compressed TCP */
|
case PPP_VJC_COMP: /* VJ compressed TCP */
|
||||||
/*
|
/*
|
||||||
* Clip off the VJ header and prepend the rebuilt TCP/IP header and
|
* Clip off the VJ header and prepend the rebuilt TCP/IP header and
|
||||||
@ -850,7 +850,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
|
|||||||
/* Something's wrong so drop it. */
|
/* Something's wrong so drop it. */
|
||||||
PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ uncompressed\n", pcb->netif->num));
|
PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ uncompressed\n", pcb->netif->num));
|
||||||
break;
|
break;
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT && LWIP_TCP */
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
int i;
|
int i;
|
||||||
|
@ -808,9 +808,9 @@ pppos_input_drop(pppos_pcb *pppos)
|
|||||||
PPPDEBUG(LOG_INFO, ("pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (void*)pppos->in_head));
|
PPPDEBUG(LOG_INFO, ("pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (void*)pppos->in_head));
|
||||||
}
|
}
|
||||||
pppos_input_free_current_packet(pppos);
|
pppos_input_free_current_packet(pppos);
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT && LWIP_TCP
|
||||||
vj_uncompress_err(&pppos->ppp->vj_comp);
|
vj_uncompress_err(&pppos->ppp->vj_comp);
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT && LWIP_TCP */
|
||||||
|
|
||||||
LINK_STATS_INC(link.drop);
|
LINK_STATS_INC(link.drop);
|
||||||
MIB2_STATS_NETIF_INC(pppos->ppp->netif, ifindiscards);
|
MIB2_STATS_NETIF_INC(pppos->ppp->netif, ifindiscards);
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && VJ_SUPPORT && LWIP_TCP /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "netif/ppp/ppp_impl.h"
|
||||||
#include "netif/ppp/pppdebug.h"
|
#include "netif/ppp/pppdebug.h"
|
||||||
@ -654,4 +654,4 @@ bad:
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* PPP_SUPPORT && VJ_SUPPORT */
|
#endif /* PPP_SUPPORT && VJ_SUPPORT && LWIP_TCP */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user