clarifying what is actually the "datainput" entry in protent

This commit is contained in:
Sylvain Rochet 2012-06-02 13:03:43 +02:00
parent 89ab390719
commit 0de1293ff5
2 changed files with 13 additions and 2 deletions

View File

@ -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 */

View File

@ -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) {