From 8e9c07df39676aa7c8eac73ae033670719d63d00 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Tue, 19 Jun 2012 18:02:23 +0200 Subject: [PATCH] more idle time limit macros --- src/netif/ppp/ppp.c | 3 ++- src/netif/ppp/ppp_impl.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index a1d41d6a..c733b197 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -1989,6 +1989,7 @@ int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid) { return 0; } +#if PPP_IDLETIMELIMIT /******************************************************************** * * get_idle_time - return how long the link has been idle. @@ -1999,7 +2000,7 @@ int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip) { LWIP_UNUSED_ARG(ip); return 1; } - +#endif /* PPP_IDLETIMELIMIT */ /******************************************************************** * diff --git a/src/netif/ppp/ppp_impl.h b/src/netif/ppp/ppp_impl.h index 0a487f13..eeab0a3b 100644 --- a/src/netif/ppp/ppp_impl.h +++ b/src/netif/ppp/ppp_impl.h @@ -209,15 +209,16 @@ struct ppp_comp_stats { #endif /* PPP_STATS_SUPPORT */ +#if PPP_IDLETIMELIMIT /* * The following structure records the time in seconds since * the last NP packet was sent or received. */ -/* FIXME: add idle time support and make it optional */ struct ppp_idle { time_t xmit_idle; /* time since last NP packet sent */ time_t recv_idle; /* time since last NP packet received */ }; +#endif /* PPP_IDLETIMELIMIT */ /* FIXME: make endpoint discriminator optional */ /* FIXME: moved temporarily to ppp.h */ @@ -420,7 +421,9 @@ int cifproxyarp(ppp_pcb *pcb, u_int32_t his_adr); int sifvjcomp(ppp_pcb *pcb, int vjcomp, int cidcomp, int maxcid); +#if PPP_IDLETIMELIMIT int get_idle_time(ppp_pcb *pcb, struct ppp_idle *ip); +#endif /* PPP_IDLETIMELIMIT */ int get_loop_output(void);