Changeset 10831
- Timestamp:
- 11/08/08 17:55:58 (5 years ago)
- File:
-
- 1 edited
-
src/router/iproute2/ip/iptunnel.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/iproute2/ip/iptunnel.c
r10815 r10831 431 431 * symbolic name will not be useful. 432 432 */ 433 printf("%s: %s/ip remote %s local %s ",433 fprintf(stdout,"%s: %s/ip remote %s local %s ", 434 434 p->name, 435 435 p->iph.protocol == IPPROTO_IPIP ? "ip" : … … 443 443 char *n = do_ioctl_get_ifname(p->link); 444 444 if (n) 445 printf(" dev %s ", n);445 fprintf(stdout," dev %s ", n); 446 446 } 447 447 448 448 if (p->iph.ttl) 449 449 { 450 printf(" ttl %d ", p->iph.ttl);450 fprintf(stdout," ttl %d ", p->iph.ttl); 451 451 } 452 452 else 453 453 { 454 printf(" ttl inherit ");454 fprintf(stdout," ttl inherit "); 455 455 } 456 456 457 457 if (p->iph.tos) { 458 458 SPRINT_BUF(b1); 459 printf(" tos");459 fprintf(stdout," tos"); 460 460 if (p->iph.tos&1) 461 461 { 462 printf(" inherit");462 fprintf(stdout," inherit"); 463 463 } 464 464 if (p->iph.tos&~1) 465 465 { 466 printf("%c%s ", p->iph.tos&1 ? '/' : ' ',466 fprintf(stdout,"%c%s ", p->iph.tos&1 ? '/' : ' ', 467 467 rtnl_dsfield_n2a(p->iph.tos&~1, b1, sizeof(b1))); 468 468 } … … 471 471 if (!(p->iph.frag_off&htons(IP_DF))) 472 472 { 473 printf(" nopmtudisc");473 fprintf(stdout," nopmtudisc"); 474 474 } 475 475 476 476 if ((p->i_flags&GRE_KEY) && (p->o_flags&GRE_KEY) && p->o_key == p->i_key) 477 477 { 478 printf(" key %s", s3);478 fprintf(stdout," key %s", s3); 479 479 } 480 480 else if ((p->i_flags|p->o_flags)&GRE_KEY) { 481 481 if (p->i_flags&GRE_KEY) 482 482 { 483 printf(" ikey %s ", s3);483 fprintf(stdout," ikey %s ", s3); 484 484 } 485 485 if (p->o_flags&GRE_KEY) 486 486 { 487 printf(" okey %s ", s4);487 fprintf(stdout," okey %s ", s4); 488 488 } 489 489 } 490 490 491 491 if (p->i_flags&GRE_SEQ) 492 printf("%s Drop packets out of sequence.\n", _SL_);492 fprintf(stdout,"%s Drop packets out of sequence.\n", _SL_); 493 493 if (p->i_flags&GRE_CSUM) 494 printf("%s Checksum in received packet is required.", _SL_);494 fprintf(stdout,"%s Checksum in received packet is required.", _SL_); 495 495 if (p->o_flags&GRE_SEQ) 496 printf("%s Sequence packets on output.", _SL_);496 fprintf(stdout,"%s Sequence packets on output.", _SL_); 497 497 if (p->o_flags&GRE_CSUM) 498 printf("%s Checksum output packets.", _SL_);498 fprintf(stdout,"%s Checksum output packets.", _SL_); 499 499 } 500 500 … … 553 553 print_tunnel(&p1); 554 554 if (show_stats) { 555 printf("%s", _SL_);556 printf("RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts%s", _SL_);557 printf(" %-10ld %-12ld %-6ld %-8ld %-8ld %-8ld%s",555 fprintf(stdout,"%s", _SL_); 556 fprintf(stdout,"RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts%s", _SL_); 557 fprintf(stdout," %-10ld %-12ld %-6ld %-8ld %-8ld %-8ld%s", 558 558 rx_packets, rx_bytes, rx_errs, rx_frame, rx_fifo, rx_multi, _SL_); 559 printf("TX: Packets Bytes Errors DeadLoop NoRoute NoBufs%s", _SL_);560 printf(" %-10ld %-12ld %-6ld %-8ld %-8ld %-6ld",559 fprintf(stdout,"TX: Packets Bytes Errors DeadLoop NoRoute NoBufs%s", _SL_); 560 fprintf(stdout," %-10ld %-12ld %-6ld %-8ld %-8ld %-6ld", 561 561 tx_packets, tx_bytes, tx_errs, tx_colls, tx_carrier, tx_drops); 562 562 } 563 printf("\n");563 fprintf(stdout,"\n"); 564 564 } 565 565 return 0; … … 595 595 596 596 print_tunnel(&p); 597 printf("\n");597 fprintf(stdout,"\n"); 598 598 return 0; 599 599 }
Note: See TracChangeset
for help on using the changeset viewer.
