PPP, PPPoS, moved vj_enabled flag from PPP CORE to PPPoS

Now that we have flags in PPPoS, moved vj_enabled only used for PPPoS to
PPPoS.
This commit is contained in:
Sylvain Rochet 2015-03-10 23:41:15 +01:00
parent a60f2588d6
commit 31aea3c996
3 changed files with 11 additions and 12 deletions

View File

@ -337,13 +337,8 @@ struct ppp_pcb_s {
#if 0 /* UNUSED - PROXY ARP */
unsigned int proxy_arp_set :1; /* Have created proxy arp entry */
#endif /* UNUSED - PROXY ARP */
#if VJ_SUPPORT
unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */
#else
unsigned int :1; /* 1 bit of padding */
#endif /* VJ_SUPPORT */
#else /* PPP_IPV4_SUPPORT */
unsigned int :4; /* 4 bit of padding */
unsigned int :3; /* 3 bit of padding */
#endif /* PPP_IPV4_SUPPORT */
#if PPP_IPV6_SUPPORT
unsigned int ipv6cp_is_up :1; /* have called ip6cp_up() */
@ -352,7 +347,6 @@ struct ppp_pcb_s {
unsigned int :2; /* 2 bit of padding */
#endif /* PPP_IPV6_SUPPORT */
unsigned int lcp_echo_timer_running :1; /* set if a timer is running */
unsigned int :7; /* 7 bits of padding to round out to 16 bits */
u32_t last_xmit; /* Time of last transmission. */

View File

@ -78,7 +78,12 @@ struct pppos_pcb_s {
/* flags */
unsigned int open :1; /* Set if PPPoS is open */
unsigned int :7; /* 7 bits of padding to round out to 8 bits */
#if VJ_SUPPORT
unsigned int vj_enabled :1; /* Flag indicating VJ compression enabled. */
#else
unsigned int :1; /* 1 bit of padding */
#endif /* VJ_SUPPORT */
unsigned int :6; /* 6 bits of padding to round out to 8 bits */
/* PPPoS rx */
ext_accm in_accm; /* Async-Ctl-Char-Map for input. */

View File

@ -297,7 +297,7 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u_short protocol)
* Attempt Van Jacobson header compression if VJ is configured and
* this is an IP packet.
*/
if (protocol == PPP_IP && ppp->vj_enabled) {
if (protocol == PPP_IP && pppos->vj_enabled) {
switch (vj_compress_tcp(&pppos->vj_comp, pb)) {
case TYPE_IP:
/* No change...
@ -850,7 +850,7 @@ pppos_vjc_config(ppp_pcb *ppp, void *ctx, int vjcomp, int cidcomp, int maxcid)
{
pppos_pcb *pppos = (pppos_pcb *)ctx;
ppp->vj_enabled = vjcomp;
pppos->vj_enabled = vjcomp;
pppos->vj_comp.compressSlot = cidcomp;
pppos->vj_comp.maxSlotIndex = maxcid;
PPPDEBUG(LOG_INFO, ("pppos_vjc_config[%d]: VJ compress enable=%d slot=%d max slot=%d\n",
@ -865,7 +865,7 @@ pppos_netif_input(ppp_pcb *ppp, void *ctx, struct pbuf *p, u16_t protocol)
switch(protocol) {
case PPP_VJC_COMP: /* VJ compressed TCP */
if (!ppp->vj_enabled) {
if (!pppos->vj_enabled) {
break;
}
/*
@ -883,7 +883,7 @@ pppos_netif_input(ppp_pcb *ppp, void *ctx, struct pbuf *p, u16_t protocol)
break;
case PPP_VJC_UNCOMP: /* VJ uncompressed TCP */
if (!ppp->vj_enabled) {
if (!pppos->vj_enabled) {
break;
}
/*