PPP, CORE, new callbacks, send_config, recv_config, vj_config

Removed some calls from PPP core to PPPoS low level protocols,
the const struct allows us to have more and more callbacks
without using more RAM.
This commit is contained in:
Sylvain Rochet
2015-02-19 23:47:10 +01:00
parent 985de035bc
commit b92fe3eecb
6 changed files with 49 additions and 46 deletions

View File

@@ -157,6 +157,12 @@ struct link_callbacks {
err_t (*write)(ppp_pcb *pcb, void *ctx, struct pbuf *p);
/* Send a packet from lwIP core (IPv4 or IPv6) */
err_t (*netif_output)(ppp_pcb *pcb, void *ctx, struct pbuf *p, u_short protocol);
/* configure the transmit-side characteristics of the PPP interface */
void (*send_config)(ppp_pcb *pcb, void *ctx, u32_t accm);
/* confire the receive-side characteristics of the PPP interface */
void (*recv_config)(ppp_pcb *pcb, void *ctx, u32_t accm);
/* configure TCP header compression */
void (*vj_config)(ppp_pcb *pcb, void *ctx, int vjcomp, int cidcomp, int maxcid);
};
/*

View File

@@ -102,10 +102,7 @@ void pppos_input(ppp_pcb *ppp, u_char* data, int len);
*
* You may use them if you REALLY know what you are doing.
*/
void pppos_accm_out_config(pppos_pcb *pppos, u32_t accm);
void pppos_accm_in_config(pppos_pcb *pppos, u32_t accm);
sio_fd_t pppos_get_fd(pppos_pcb *pppos);
void pppos_vjc_config(pppos_pcb *pppos, int vjcomp, int cidcomp, int maxcid);
int pppos_vjc_comp(pppos_pcb *pppos, struct pbuf *pb);
int pppos_vjc_uncomp(pppos_pcb *pppos, struct pbuf *pb);