Changeset 10831


Ignore:
Timestamp:
11/08/08 17:55:58 (5 years ago)
Author:
BrainSlayer
Message:

need info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/iproute2/ip/iptunnel.c

    r10815 r10831  
    431431         * symbolic name will not be useful. 
    432432         */ 
    433         printf("%s: %s/ip  remote %s  local %s ", 
     433        fprintf(stdout,"%s: %s/ip  remote %s  local %s ", 
    434434               p->name, 
    435435               p->iph.protocol == IPPROTO_IPIP ? "ip" : 
     
    443443                char *n = do_ioctl_get_ifname(p->link); 
    444444                if (n) 
    445                         printf(" dev %s ", n); 
     445                        fprintf(stdout," dev %s ", n); 
    446446        } 
    447447 
    448448        if (p->iph.ttl) 
    449449        { 
    450                 printf(" ttl %d ", p->iph.ttl); 
     450                fprintf(stdout," ttl %d ", p->iph.ttl); 
    451451        } 
    452452        else 
    453453        { 
    454                 printf(" ttl inherit "); 
     454                fprintf(stdout," ttl inherit "); 
    455455        } 
    456456         
    457457        if (p->iph.tos) { 
    458458                SPRINT_BUF(b1); 
    459                 printf(" tos"); 
     459                fprintf(stdout," tos"); 
    460460                if (p->iph.tos&1) 
    461461                { 
    462                         printf(" inherit"); 
     462                        fprintf(stdout," inherit"); 
    463463                } 
    464464                if (p->iph.tos&~1) 
    465465                { 
    466                         printf("%c%s ", p->iph.tos&1 ? '/' : ' ', 
     466                        fprintf(stdout,"%c%s ", p->iph.tos&1 ? '/' : ' ', 
    467467                               rtnl_dsfield_n2a(p->iph.tos&~1, b1, sizeof(b1))); 
    468468                } 
     
    471471        if (!(p->iph.frag_off&htons(IP_DF))) 
    472472        { 
    473                 printf(" nopmtudisc"); 
     473                fprintf(stdout," nopmtudisc"); 
    474474        } 
    475475 
    476476        if ((p->i_flags&GRE_KEY) && (p->o_flags&GRE_KEY) && p->o_key == p->i_key) 
    477477        { 
    478                 printf(" key %s", s3); 
     478                fprintf(stdout," key %s", s3); 
    479479        } 
    480480        else if ((p->i_flags|p->o_flags)&GRE_KEY) { 
    481481                if (p->i_flags&GRE_KEY) 
    482482                { 
    483                         printf(" ikey %s ", s3); 
     483                        fprintf(stdout," ikey %s ", s3); 
    484484                } 
    485485                if (p->o_flags&GRE_KEY) 
    486486                { 
    487                         printf(" okey %s ", s4); 
     487                        fprintf(stdout," okey %s ", s4); 
    488488                } 
    489489        } 
    490490 
    491491        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_); 
    493493        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_); 
    495495        if (p->o_flags&GRE_SEQ) 
    496                 printf("%s  Sequence packets on output.", _SL_); 
     496                fprintf(stdout,"%s  Sequence packets on output.", _SL_); 
    497497        if (p->o_flags&GRE_CSUM) 
    498                 printf("%s  Checksum output packets.", _SL_); 
     498                fprintf(stdout,"%s  Checksum output packets.", _SL_); 
    499499} 
    500500 
     
    553553                print_tunnel(&p1); 
    554554                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", 
    558558                               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", 
    561561                               tx_packets, tx_bytes, tx_errs, tx_colls, tx_carrier, tx_drops); 
    562562                } 
    563                 printf("\n"); 
     563                fprintf(stdout,"\n"); 
    564564        } 
    565565        return 0; 
     
    595595 
    596596        print_tunnel(&p); 
    597         printf("\n"); 
     597        fprintf(stdout,"\n"); 
    598598        return 0; 
    599599} 
Note: See TracChangeset for help on using the changeset viewer.