mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 22:14:25 +00:00
PPP, PPPoS, removed xmit_accm, almost duplicate of out_accm
xmit_accm was meant to be a user configurable asyncmap, it was actually broken since the introduction of ppp_new by the way we now reset the PPP initial state, looks like no one until now is needing it anymore. If necessary we will reintroduce this feature later properly instead of a dirty and ugly hack into the PPP code.
This commit is contained in:
parent
ecb8aa6fc1
commit
baaa2592a6
@ -368,9 +368,7 @@ struct ppp_pcb_s {
|
||||
unsigned int :5; /* 5 bits of padding to round out to 16 bits */
|
||||
|
||||
#if PPPOS_SUPPORT
|
||||
/* FIXME: there is probably one superfluous */
|
||||
ext_accm out_accm; /* Async-Ctl-Char-Map for output. */
|
||||
ext_accm xmit_accm; /* extended transmit ACCM */
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
|
||||
u32_t last_xmit; /* Time of last transmission. */
|
||||
|
@ -396,24 +396,6 @@ static void lcp_init(ppp_pcb *pcb) {
|
||||
ao->neg_pcompression = 1;
|
||||
ao->neg_accompression = 1;
|
||||
ao->neg_endpoint = 1;
|
||||
|
||||
#if PPPOS_SUPPORT
|
||||
/*
|
||||
* Set transmit escape for the flag and escape characters plus anything
|
||||
* set for the allowable options.
|
||||
*/
|
||||
memset(pcb->xmit_accm, 0, sizeof(ext_accm));
|
||||
pcb->xmit_accm[15] = 0x60;
|
||||
pcb->xmit_accm[0] = (u_char)((ao->asyncmap & 0xFF));
|
||||
pcb->xmit_accm[1] = (u_char)((ao->asyncmap >> 8) & 0xFF);
|
||||
pcb->xmit_accm[2] = (u_char)((ao->asyncmap >> 16) & 0xFF);
|
||||
pcb->xmit_accm[3] = (u_char)((ao->asyncmap >> 24) & 0xFF);
|
||||
LCPDEBUG(("lcp_init: xmit_accm=%X %X %X %X\n",
|
||||
pcb->xmit_accm[0],
|
||||
pcb->xmit_accm[1],
|
||||
pcb->xmit_accm[2],
|
||||
pcb->xmit_accm[3]));
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
}
|
||||
|
||||
|
||||
@ -469,36 +451,18 @@ void lcp_close(ppp_pcb *pcb, const char *reason) {
|
||||
*/
|
||||
void lcp_lowerup(ppp_pcb *pcb) {
|
||||
lcp_options *wo = &pcb->lcp_wantoptions;
|
||||
#if PPPOS_SUPPORT
|
||||
lcp_options *ao = &pcb->lcp_allowoptions;
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
fsm *f = &pcb->lcp_fsm;
|
||||
/*
|
||||
* Don't use A/C or protocol compression on transmission,
|
||||
* but accept A/C and protocol compressed packets
|
||||
* if we are going to ask for A/C and protocol compression.
|
||||
*/
|
||||
#if PPPOS_SUPPORT
|
||||
ppp_set_xaccm(pcb, &pcb->xmit_accm);
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
if (ppp_send_config(pcb, PPP_MRU, 0xffffffff, 0, 0) < 0
|
||||
|| ppp_recv_config(pcb, PPP_MRU, (pcb->settings.lax_recv? 0: 0xffffffff),
|
||||
wo->neg_pcompression, wo->neg_accompression) < 0)
|
||||
return;
|
||||
pcb->peer_mru = PPP_MRU;
|
||||
|
||||
#if PPPOS_SUPPORT
|
||||
ao->asyncmap = (u_long)pcb->xmit_accm[0]
|
||||
| ((u_long)pcb->xmit_accm[1] << 8)
|
||||
| ((u_long)pcb->xmit_accm[2] << 16)
|
||||
| ((u_long)pcb->xmit_accm[3] << 24);
|
||||
LCPDEBUG(("lcp_lowerup: asyncmap=%X %X %X %X\n",
|
||||
pcb->xmit_accm[3],
|
||||
pcb->xmit_accm[2],
|
||||
pcb->xmit_accm[1],
|
||||
pcb->xmit_accm[0]));
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
|
||||
if (pcb->settings.listen_time != 0) {
|
||||
f->flags |= DELAYED_UP;
|
||||
TIMEOUTMS(lcp_delayed_up, f, pcb->settings.listen_time);
|
||||
|
@ -194,22 +194,6 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u_short prot
|
||||
/***********************************/
|
||||
/*** PUBLIC FUNCTION DEFINITIONS ***/
|
||||
/***********************************/
|
||||
|
||||
#if PPPOS_SUPPORT
|
||||
/*
|
||||
* ppp_set_xaccm - set the extended transmit ACCM for the interface.
|
||||
*/
|
||||
void ppp_set_xaccm(ppp_pcb *pcb, ext_accm *accm) {
|
||||
SMEMCPY(pcb->out_accm, accm, sizeof(ext_accm));
|
||||
PPPDEBUG(LOG_INFO, ("ppp_set_xaccm[%d]: out_accm=%X %X %X %X\n",
|
||||
pcb->num,
|
||||
pcb->out_accm[0],
|
||||
pcb->out_accm[1],
|
||||
pcb->out_accm[2],
|
||||
pcb->out_accm[3]));
|
||||
}
|
||||
#endif /* PPPOS_SUPPORT */
|
||||
|
||||
void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) {
|
||||
|
||||
#if PAP_SUPPORT
|
||||
|
Loading…
x
Reference in New Issue
Block a user