Changeset fd55b7d in rtems
- Timestamp:
- 03/21/02 15:01:32 (22 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 90f30c8
- Parents:
- df6348bb
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libblock/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2002-03-21 Alexander Kukuta <kam@oktet.ru> 2 7 -
c/src/exec/libnetworking/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2001-03-20 Till Straumann <strauman@SLAC.Stanford.EDU> 2 7 -
c/src/exec/libnetworking/net/if_ppp.c
rdf6348bb rfd55b7d 379 379 if ( sc->sc_rxtask == 0 ) { 380 380 /* start rx daemon task */ 381 status = rtems_task_create(rtems_build_name('R','x','P','0' ), priority, 2048,381 status = rtems_task_create(rtems_build_name('R','x','P','0'+sc->sc_if.if_unit), priority, 2048, 382 382 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 383 383 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 394 394 395 395 /* start tx daemon task */ 396 status = rtems_task_create(rtems_build_name('T','x','P','0' ), priority, 2048,396 status = rtems_task_create(rtems_build_name('T','x','P','0'+sc->sc_if.if_unit), priority, 2048, 397 397 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 398 398 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 410 410 411 411 /* mark driver running and output inactive */ 412 sc->sc_if.if_flags |= IFF_RUNNING; 412 /* ilya: IFF_RUNNING flag will be marked after the IPCP goes up */ 413 /* sc->sc_if.if_flags |= IFF_RUNNING; */ 413 414 } 414 415 … … 418 419 int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) 419 420 { 420 int i = (int)0; 421 /* int i = (int)0; */ 421 422 struct ppp_softc *sc; 422 423 for (sc = ppp_softc; i < NPPP; sc++) { 424 sc->sc_if.if_name = "ppp"; 425 sc->sc_if.if_unit = i++; 423 char *name; 424 int number; 425 426 427 number = rtems_bsdnet_parse_driver_name (config, &name); 428 429 if (!attaching || (number >= NPPP)) 430 return 0; 431 432 sc = &ppp_softc[number]; 433 434 if (sc->sc_if.if_name != NULL) 435 return 0; /* interface is already attached */ 436 437 /* for (sc = ppp_softc; i < NPPP; sc++) { */ 438 sc->sc_if.if_name = name /*"ppp"*/; 439 sc->sc_if.if_unit = number /*i++*/; 426 440 sc->sc_if.if_mtu = PPP_MTU; 427 441 sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST; … … 442 456 bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_PPP, PPP_HDRLEN); 443 457 #endif 444 } 458 /* } */ 445 459 446 460 return ( 1 ); -
c/src/exec/libnetworking/net/ppp_tty.c
rdf6348bb rfd55b7d 193 193 register struct ppp_softc *sc; 194 194 struct mbuf *m = (struct mbuf *)0; 195 extern int termios_baud_to_number(int); 195 196 196 197 if (tty->t_line == PPPDISC) { … … 239 240 /* initialize values */ 240 241 sc->sc_if.if_flags |= IFF_RUNNING; 241 sc->sc_if.if_baudrate = 57600; /* FIX: get line speed from termios */ 242 sc->sc_if.if_baudrate = 243 termios_baud_to_number(tty->termios.c_cflag & CBAUD); 242 244 243 245 tty->t_sc = (void *)sc; … … 422 424 ppptioctl(struct rtems_termios_tty *tty, rtems_libio_ioctl_args_t *args) 423 425 { 424 int i; 426 /* int i; */ 425 427 int error = RTEMS_SUCCESSFUL; 426 428 int cmd = args->command; … … 562 564 { 563 565 char c; 566 char *sendBegin; 564 567 char cFrame = (char )PPP_FLAG; 565 568 u_char ioffset = (u_char )0; … … 619 622 sc->sc_outflag |= SC_TX_ESCAPE; 620 623 } 624 sendBegin = &c; 621 625 } 622 626 else { 623 /* escape not needed - increment the offset */ 624 ioffset++; 627 /* escape not needed - increment the offset as much as possible */ 628 while ((!ESCAPE_P(c)) && ((sc->sc_outoff + ioffset) < sc->sc_outlen)) { 629 ioffset++; 630 c = sc->sc_outbuf[sc->sc_outoff + ioffset]; 631 } 632 sendBegin = &sc->sc_outbuf[sc->sc_outoff]; 625 633 } 626 634 627 /* write out the character and update the stats */628 (*tp->device.write)(tp->minor, &c,1);629 sc->sc_stats.ppp_obytes ++;635 /* write out the character(s) and update the stats */ 636 (*tp->device.write)(tp->minor, sendBegin, (ioffset > 0) ? ioffset : 1); 637 sc->sc_stats.ppp_obytes += (ioffset > 0) ? ioffset : 1; 630 638 sc->sc_outoff += ioffset; 631 639 } -
c/src/libblock/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2002-03-21 Alexander Kukuta <kam@oktet.ru> 2 7 -
c/src/libnetworking/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2001-03-20 Till Straumann <strauman@SLAC.Stanford.EDU> 2 7 -
c/src/libnetworking/net/if_ppp.c
rdf6348bb rfd55b7d 379 379 if ( sc->sc_rxtask == 0 ) { 380 380 /* start rx daemon task */ 381 status = rtems_task_create(rtems_build_name('R','x','P','0' ), priority, 2048,381 status = rtems_task_create(rtems_build_name('R','x','P','0'+sc->sc_if.if_unit), priority, 2048, 382 382 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 383 383 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 394 394 395 395 /* start tx daemon task */ 396 status = rtems_task_create(rtems_build_name('T','x','P','0' ), priority, 2048,396 status = rtems_task_create(rtems_build_name('T','x','P','0'+sc->sc_if.if_unit), priority, 2048, 397 397 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 398 398 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 410 410 411 411 /* mark driver running and output inactive */ 412 sc->sc_if.if_flags |= IFF_RUNNING; 412 /* ilya: IFF_RUNNING flag will be marked after the IPCP goes up */ 413 /* sc->sc_if.if_flags |= IFF_RUNNING; */ 413 414 } 414 415 … … 418 419 int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) 419 420 { 420 int i = (int)0; 421 /* int i = (int)0; */ 421 422 struct ppp_softc *sc; 422 423 for (sc = ppp_softc; i < NPPP; sc++) { 424 sc->sc_if.if_name = "ppp"; 425 sc->sc_if.if_unit = i++; 423 char *name; 424 int number; 425 426 427 number = rtems_bsdnet_parse_driver_name (config, &name); 428 429 if (!attaching || (number >= NPPP)) 430 return 0; 431 432 sc = &ppp_softc[number]; 433 434 if (sc->sc_if.if_name != NULL) 435 return 0; /* interface is already attached */ 436 437 /* for (sc = ppp_softc; i < NPPP; sc++) { */ 438 sc->sc_if.if_name = name /*"ppp"*/; 439 sc->sc_if.if_unit = number /*i++*/; 426 440 sc->sc_if.if_mtu = PPP_MTU; 427 441 sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST; … … 442 456 bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_PPP, PPP_HDRLEN); 443 457 #endif 444 } 458 /* } */ 445 459 446 460 return ( 1 ); -
c/src/libnetworking/net/ppp_tty.c
rdf6348bb rfd55b7d 193 193 register struct ppp_softc *sc; 194 194 struct mbuf *m = (struct mbuf *)0; 195 extern int termios_baud_to_number(int); 195 196 196 197 if (tty->t_line == PPPDISC) { … … 239 240 /* initialize values */ 240 241 sc->sc_if.if_flags |= IFF_RUNNING; 241 sc->sc_if.if_baudrate = 57600; /* FIX: get line speed from termios */ 242 sc->sc_if.if_baudrate = 243 termios_baud_to_number(tty->termios.c_cflag & CBAUD); 242 244 243 245 tty->t_sc = (void *)sc; … … 422 424 ppptioctl(struct rtems_termios_tty *tty, rtems_libio_ioctl_args_t *args) 423 425 { 424 int i; 426 /* int i; */ 425 427 int error = RTEMS_SUCCESSFUL; 426 428 int cmd = args->command; … … 562 564 { 563 565 char c; 566 char *sendBegin; 564 567 char cFrame = (char )PPP_FLAG; 565 568 u_char ioffset = (u_char )0; … … 619 622 sc->sc_outflag |= SC_TX_ESCAPE; 620 623 } 624 sendBegin = &c; 621 625 } 622 626 else { 623 /* escape not needed - increment the offset */ 624 ioffset++; 627 /* escape not needed - increment the offset as much as possible */ 628 while ((!ESCAPE_P(c)) && ((sc->sc_outoff + ioffset) < sc->sc_outlen)) { 629 ioffset++; 630 c = sc->sc_outbuf[sc->sc_outoff + ioffset]; 631 } 632 sendBegin = &sc->sc_outbuf[sc->sc_outoff]; 625 633 } 626 634 627 /* write out the character and update the stats */628 (*tp->device.write)(tp->minor, &c,1);629 sc->sc_stats.ppp_obytes ++;635 /* write out the character(s) and update the stats */ 636 (*tp->device.write)(tp->minor, sendBegin, (ioffset > 0) ? ioffset : 1); 637 sc->sc_stats.ppp_obytes += (ioffset > 0) ? ioffset : 1; 630 638 sc->sc_outoff += ioffset; 631 639 } -
cpukit/libblock/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2002-03-21 Alexander Kukuta <kam@oktet.ru> 2 7 -
cpukit/libnetworking/ChangeLog
rdf6348bb rfd55b7d 1 2002-03-21 Ilya Alexeev <ilya@continuum.ru> 2 3 * net/if_ppp.c, net/ppp_tty.c: Initial preparations for multiple 4 PPPD connections. 5 1 6 2001-03-20 Till Straumann <strauman@SLAC.Stanford.EDU> 2 7 -
cpukit/libnetworking/net/if_ppp.c
rdf6348bb rfd55b7d 379 379 if ( sc->sc_rxtask == 0 ) { 380 380 /* start rx daemon task */ 381 status = rtems_task_create(rtems_build_name('R','x','P','0' ), priority, 2048,381 status = rtems_task_create(rtems_build_name('R','x','P','0'+sc->sc_if.if_unit), priority, 2048, 382 382 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 383 383 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 394 394 395 395 /* start tx daemon task */ 396 status = rtems_task_create(rtems_build_name('T','x','P','0' ), priority, 2048,396 status = rtems_task_create(rtems_build_name('T','x','P','0'+sc->sc_if.if_unit), priority, 2048, 397 397 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 398 398 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 410 410 411 411 /* mark driver running and output inactive */ 412 sc->sc_if.if_flags |= IFF_RUNNING; 412 /* ilya: IFF_RUNNING flag will be marked after the IPCP goes up */ 413 /* sc->sc_if.if_flags |= IFF_RUNNING; */ 413 414 } 414 415 … … 418 419 int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching) 419 420 { 420 int i = (int)0; 421 /* int i = (int)0; */ 421 422 struct ppp_softc *sc; 422 423 for (sc = ppp_softc; i < NPPP; sc++) { 424 sc->sc_if.if_name = "ppp"; 425 sc->sc_if.if_unit = i++; 423 char *name; 424 int number; 425 426 427 number = rtems_bsdnet_parse_driver_name (config, &name); 428 429 if (!attaching || (number >= NPPP)) 430 return 0; 431 432 sc = &ppp_softc[number]; 433 434 if (sc->sc_if.if_name != NULL) 435 return 0; /* interface is already attached */ 436 437 /* for (sc = ppp_softc; i < NPPP; sc++) { */ 438 sc->sc_if.if_name = name /*"ppp"*/; 439 sc->sc_if.if_unit = number /*i++*/; 426 440 sc->sc_if.if_mtu = PPP_MTU; 427 441 sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST; … … 442 456 bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_PPP, PPP_HDRLEN); 443 457 #endif 444 } 458 /* } */ 445 459 446 460 return ( 1 ); -
cpukit/libnetworking/net/ppp_tty.c
rdf6348bb rfd55b7d 193 193 register struct ppp_softc *sc; 194 194 struct mbuf *m = (struct mbuf *)0; 195 extern int termios_baud_to_number(int); 195 196 196 197 if (tty->t_line == PPPDISC) { … … 239 240 /* initialize values */ 240 241 sc->sc_if.if_flags |= IFF_RUNNING; 241 sc->sc_if.if_baudrate = 57600; /* FIX: get line speed from termios */ 242 sc->sc_if.if_baudrate = 243 termios_baud_to_number(tty->termios.c_cflag & CBAUD); 242 244 243 245 tty->t_sc = (void *)sc; … … 422 424 ppptioctl(struct rtems_termios_tty *tty, rtems_libio_ioctl_args_t *args) 423 425 { 424 int i; 426 /* int i; */ 425 427 int error = RTEMS_SUCCESSFUL; 426 428 int cmd = args->command; … … 562 564 { 563 565 char c; 566 char *sendBegin; 564 567 char cFrame = (char )PPP_FLAG; 565 568 u_char ioffset = (u_char )0; … … 619 622 sc->sc_outflag |= SC_TX_ESCAPE; 620 623 } 624 sendBegin = &c; 621 625 } 622 626 else { 623 /* escape not needed - increment the offset */ 624 ioffset++; 627 /* escape not needed - increment the offset as much as possible */ 628 while ((!ESCAPE_P(c)) && ((sc->sc_outoff + ioffset) < sc->sc_outlen)) { 629 ioffset++; 630 c = sc->sc_outbuf[sc->sc_outoff + ioffset]; 631 } 632 sendBegin = &sc->sc_outbuf[sc->sc_outoff]; 625 633 } 626 634 627 /* write out the character and update the stats */628 (*tp->device.write)(tp->minor, &c,1);629 sc->sc_stats.ppp_obytes ++;635 /* write out the character(s) and update the stats */ 636 (*tp->device.write)(tp->minor, sendBegin, (ioffset > 0) ? ioffset : 1); 637 sc->sc_stats.ppp_obytes += (ioffset > 0) ? ioffset : 1; 630 638 sc->sc_outoff += ioffset; 631 639 }
Note: See TracChangeset
for help on using the changeset viewer.