PPP, MPPE, merged mppe_comp_init() and mppe_decomp_init() into mppe_init()

Removing a bit of redundancy and previous artefact of a generic kernel
interface. Exporting mppe_init() instead of mppe_comp_init() plus
mppe_decomp_init().
This commit is contained in:
Sylvain Rochet 2015-04-18 00:48:26 +02:00
parent a1fe83c070
commit 3f2e8ebcdf
2 changed files with 3 additions and 22 deletions

View File

@ -152,12 +152,10 @@ struct ppp_mppe_state {
int debug;
};
int mppe_comp_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int unit,
int hdrlen, int debug);
int mppe_init(struct ppp_mppe_state *state, unsigned char *options, int optlen,
int unit, int debug, const char *debugstr);
void mppe_comp_reset(struct ppp_mppe_state *state);
err_t mppe_compress(struct ppp_mppe_state *state, struct pbuf **pb, u16_t protocol);
int mppe_decomp_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int unit,
int hdrlen, int mru, int debug);
void mppe_decomp_reset(struct ppp_mppe_state *state);
err_t mppe_decompress(struct ppp_mppe_state *state, struct pbuf **pb);
void mppe_incomp(struct ppp_mppe_state *state, unsigned char *ibuf, int icnt);

View File

@ -116,7 +116,7 @@ static void mppe_rekey(struct ppp_mppe_state * state, int initial_key)
/*
* Initialize (de)compressor state.
*/
static int
int
mppe_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int unit, int debug,
const char *debugstr)
{
@ -184,14 +184,6 @@ mppe_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int
return 1;
}
int
mppe_comp_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int unit,
int hdrlen, int debug)
{
LWIP_UNUSED_ARG(hdrlen);
return mppe_init(state, options, optlen, unit, debug, "mppe_comp_init");
}
/*
* We received a CCP Reset-Request (actually, we are sending a Reset-Ack),
* tell the compressor to rekey. Note that we MUST NOT rekey for
@ -265,15 +257,6 @@ mppe_compress(struct ppp_mppe_state *state, struct pbuf **pb, u16_t protocol)
return ERR_OK;
}
int
mppe_decomp_init(struct ppp_mppe_state *state, unsigned char *options, int optlen, int unit,
int hdrlen, int mru, int debug)
{
LWIP_UNUSED_ARG(hdrlen);
LWIP_UNUSED_ARG(mru);
return mppe_init(state, options, optlen, unit, debug, "mppe_decomp_init");
}
/*
* We received a CCP Reset-Ack. Just ignore it.
*/