From 0de1293ff5001d2927ff0e1292d649b3db2fd63e Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 2 Jun 2012 13:03:43 +0200 Subject: [PATCH] clarifying what is actually the "datainput" entry in protent --- src/netif/ppp/pppd.h | 3 +++ src/netif/ppp/pppmy.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/netif/ppp/pppd.h b/src/netif/ppp/pppd.h index 867f701b..df88d71f 100644 --- a/src/netif/ppp/pppd.h +++ b/src/netif/ppp/pppd.h @@ -428,6 +428,9 @@ struct protent { void (*printer) __P((void *, char *, ...)), void *arg)); #endif /* PRINTPKT_SUPPORT */ + /* FIXME: data input is only used by CCP, which is not supported at this time, + * should we remove this entry and save some flash ? + */ /* Process a received data packet */ void (*datainput) __P((int unit, u_char *pkt, int len)); bool enabled_flag; /* 0 iff protocol is disabled */ diff --git a/src/netif/ppp/pppmy.c b/src/netif/ppp/pppmy.c index e52c5e2d..9c00727c 100644 --- a/src/netif/ppp/pppmy.c +++ b/src/netif/ppp/pppmy.c @@ -277,13 +277,21 @@ static void ppp_input(void *arg) { (*protp->input)(pd, nb->payload, nb->len); goto out; } -#if 0 /* Unused ? */ +#if 0 /* UNUSED + * + * This is actually a (hacked?) way for the PPP kernel implementation to pass a + * data packet to the PPP daemon. The PPP daemon normally only do signaling + * (LCP, PAP, CHAP, IPCP, ...) and does not handle any data packet at all. + * + * This is only used by CCP, which we cannot support until we have a CCP data + * implementation. + */ if (protocol == (protp->protocol & ~0x8000) && protp->enabled_flag && protp->datainput != NULL) { (*protp->datainput)(pd, nb->payload, nb->len); goto out; } -#endif /* Unused */ +#endif /* UNUSED */ } if (debug) {