PPP, add PPPoS CB for PPPoS private data
Created a new PPPoS CB going to have PPPoS private data, so allocating a PPPoE or a PPPoL2TP interface does not allocate as well PPPoS variables.
This commit is contained in:
@@ -102,6 +102,9 @@ LWIP_MEMPOOL(LOCALHOSTLIST, MEMP_NUM_LOCALHOSTLIST, LOCALHOSTLIST_ELEM_SIZE,
|
||||
|
||||
#if PPP_SUPPORT
|
||||
LWIP_MEMPOOL(PPP_PCB, MEMP_NUM_PPP_PCB, sizeof(ppp_pcb), "PPP_PCB")
|
||||
#if PPPOS_SUPPORT
|
||||
LWIP_MEMPOOL(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB")
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
#if PPPOE_SUPPORT
|
||||
LWIP_MEMPOOL(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF")
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
|
||||
@@ -416,6 +416,14 @@
|
||||
#define MEMP_NUM_PPP_PCB 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS
|
||||
* interfaces (only used with PPPOS_SUPPORT==1)
|
||||
*/
|
||||
#ifndef MEMP_NUM_PPPOS_INTERFACES
|
||||
#define MEMP_NUM_PPPOS_INTERFACES MEMP_NUM_PPP_PCB
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MEMP_NUM_PPPOE_INTERFACES: the number of concurrently active PPPoE
|
||||
* interfaces (only used with PPPOE_SUPPORT==1)
|
||||
|
||||
@@ -39,6 +39,14 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
/*
|
||||
* PPPoS interface control block.
|
||||
*/
|
||||
typedef struct pppos_pcb_s pppos_pcb;
|
||||
struct pppos_pcb_s {
|
||||
ppp_pcb *ppp; /* PPP PCB */
|
||||
};
|
||||
|
||||
/* Create a new PPPoS session. */
|
||||
ppp_pcb *ppp_over_serial_create(struct netif *pppif, sio_fd_t fd,
|
||||
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
|
||||
|
||||
Reference in New Issue
Block a user