/[lwip]/lwip/src/netif/ppp/ppp.c
ViewVC logotype

Diff of /lwip/src/netif/ppp/ppp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jani, Tue May 27 14:37:56 2003 UTC revision 1.2 by jani, Fri May 30 08:49:34 2003 UTC
# Line 351  int pppOpen(ppp_sio_fd_t fd, void (*link Line 351  int pppOpen(ppp_sio_fd_t fd, void (*link
351       * so the arg passed to sio_open means nothing       * so the arg passed to sio_open means nothing
352       */       */
353      fd = sio_open(2);      fd = sio_open(2);
354      /* Find a free PPP session descriptor. */      /* Find a free PPP session descriptor. Critical region? */
     //OS_ENTER_CRITICAL();  
355      for (pd = 0; pd < NUM_PPP && pppControl[pd].openFlag != 0; pd++);      for (pd = 0; pd < NUM_PPP && pppControl[pd].openFlag != 0; pd++);
356      if (pd >= NUM_PPP)      if (pd >= NUM_PPP)
357          pd = PPPERR_OPEN;          pd = PPPERR_OPEN;
358      else      else
359          pppControl[pd].openFlag = !0;          pppControl[pd].openFlag = !0;
     //OS_EXIT_CRITICAL();  
360    
361      /* Launch a deamon thread. */      /* Launch a deamon thread. */
362      if (pd >= 0) {      if (pd >= 0) {
# Line 876  u32_t GetMask(u32_t addr) Line 874  u32_t GetMask(u32_t addr)
874      else      else
875          nmask = IN_CLASSC_NET;          nmask = IN_CLASSC_NET;
876      /* class D nets are disallowed by bad_ip_adrs */      /* class D nets are disallowed by bad_ip_adrs */
 //    mask = netMask | htonl(nmask);  
877      mask = subnetMask | htonl(nmask);      mask = subnetMask | htonl(nmask);
878            
879      /* XXX      /* XXX
# Line 1310  out: Line 1307  out:
1307  static void pppDrop(PPPControl *pc)  static void pppDrop(PPPControl *pc)
1308  {  {
1309      if (pc->inHead != NULL) {      if (pc->inHead != NULL) {
1310  //        PPPDEBUG((LOG_INFO, "pppDrop: %d:%.*H\n", pc->inHead->len, min(60, pc->inHead->len * 2), pc->inHead->payload));  #if 0      
1311            PPPDEBUG((LOG_INFO, "pppDrop: %d:%.*H\n", pc->inHead->len, min(60, pc->inHead->len * 2), pc->inHead->payload));
1312    #endif  
1313          PPPDEBUG((LOG_INFO, "pppDrop: nBuf len=%d\n", pc->inHead->len));          PPPDEBUG((LOG_INFO, "pppDrop: nBuf len=%d\n", pc->inHead->len));
1314          pbuf_free(pc->inHead);          pbuf_free(pc->inHead);
1315          pc->inHead = NULL;          pc->inHead = NULL;
# Line 1516  static void pppInProc(int pd, u_char *s, Line 1515  static void pppInProc(int pd, u_char *s,
1515              pc->inFCS = PPP_FCS(pc->inFCS, curChar);              pc->inFCS = PPP_FCS(pc->inFCS, curChar);
1516          }          }
1517      }      }
1518  //      avRandomize();          avRandomize();
1519  }  }
1520    
1521  /*  /*

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26