Changeset a1b899f


Ignore:
Timestamp:
03/16/07 11:51:07 (14 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
0fd4ad6
Parents:
3198df4
Message:

Libtrace now exports the svn revision number of the distribution
Added two new RT_TYPES that signify server restarts and client connection failures.
Updated the INSTALL documentation.
Added more option combinations to synopt_report.c
The examples directory is no longer treated as EXTRA_DIST in automake

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • INSTALL

    r870cad4 ra1b899f  
    22 * >=automake-1.9
    33 * >=libpcap-0.8
    4  
     4 * flex and bison
     5
     6Strongly recommended:
     7 * zlib-dev (for reading and writing compressed traces)
     8
     9Optional:
     10 * DAG libraries (both 2.4 and 2.5 versions are supported)
     11----------------------------------
     12
    513Installing libtrace:
    614
    715./configure
    816make
     17make install
    918
     19The above series of commands will install libtrace into /usr/local/lib. If
     20you wish to install to a non-standard location, append the
     21--prefix=DIR option to the ./configure command. ./configure also takes
     22a number of other options - run ./configure --help to view a comprehensive
     23list.
    1024
    11 You may need to add the line '/usr/local/lib' to your /etc/ld.so.conf and
    12 run 'ldconfig' as root.
     25You may need to add the library location (e.g. /usr/local/lib) to your
     26/etc/ld.so.conf and run 'ldconfig' as root.
    1327
    1428----------------------------------
    1529Using libtrace:
    1630
    17 There are a number of example programs which should cover the basics of what you need within libtrace-x.y.z/examples/.
    18 
    19 ----------------------------------
    20 Large trace files:
    21 
    22 The versions of libpcap that ship with Debian Woody don't support
    23 large file offsets.
     31The best source of information on how to use libtrace and the tools that come
     32with it is the libtrace wiki located at
     33http://www.wand.net.nz/trac/libtrace/wiki
    2434
    2535
    26 To get around this, you have a number of options:
    27 
    28 * Don't use compressed files.
    29 * Use stdin as the target of the input uri, and use cat or zcat to pipe the
    30   file into stdin, eg:
    31   zcat largetrace.pcap.gz | program -i pcap:-
    32 * Use process substitution in place of a filename, eg:
    33   program -i pcap:<(zcat largetrace.pcap.gz)
    34 
    35 
  • Makefile.am

    rd5a27e8 ra1b899f  
    44
    55ACLOCAL_AMFLAGS = -I m4
    6 AUTOMAKE_OPTIONS = 1.5
     6AUTOMAKE_OPTIONS = 1.9 foreign
    77
    88if HAS_DOXYGEN
    99man_MANS = docs/doxygen/man/man3/trace*.3 docs/doxygen/man/man3/libtrace*.3
    1010endif
    11 EXTRA_DIST=examples libtrace.sln libtrace.vcproj test-convert.vcproj \
     11EXTRA_DIST=libtrace.sln libtrace.vcproj test-convert.vcproj \
    1212                   test-format.vcproj test-pcap-bpf.vcproj
    1313
     
    2222
    2323dist-hook:
    24         for dir in $(EXTRA_DIST); do \
    25                 if [ ! -d $(distdir)/$$dir ]; then continue; fi; \
    26                 rm -rf `find $(distdir)/$$dir -name CVS` ; \
    27                 rm -rf `find $(distdir)/$$dir -name .svn` ; \
    28                 for i in `\ls -d $(distdir)/$$dir `; do make -C $(distdir)/$$dir/$$i clean; done \
    29         done
    30         rm -rf $(distdir)/tools/tracereport/.{svn,deps}
     24        r=`svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'` ;\
     25        sed -i "s/SVN_REVISION.*/SVN_REVISION $$r/" $(distdir)/lib/libtrace.h.in
    3126
    3227if HAS_DOXYGEN
  • lib/format_rt.c

    r3198df4 ra1b899f  
    577577                        case TRACE_RT_LOSTCONN:
    578578                                break;
     579                        case TRACE_RT_SERVERSTART:
     580                                break;
     581                        case TRACE_RT_CLIENTDROP:
     582                                break;
    579583                        default:
    580584                                printf("Bad rt type for client receipt: %d\n",
     
    619623                        return 0;
    620624                case TRACE_RT_LOSTCONN:
     625                        return 0;
     626                case TRACE_RT_SERVERSTART:
     627                        return 0;
     628                case TRACE_RT_CLIENTDROP:
    621629                        return 0;
    622630                default:
  • lib/libtrace.h.in

    r28d81c8 ra1b899f  
    131131            ((@LIBTRACE_MAJOR@<<16)|(@LIBTRACE_MID@<<8)|(@LIBTRACE_MINOR@))
    132132
     133#define LIBTRACE_SVN_REVISION 0
     134
    133135#ifdef __cplusplus
    134136extern "C" {
     
    273275        TRACE_RT_DUCK_2_5       =14,/**< Dag 2.5 Duck */
    274276        TRACE_RT_LOSTCONN       =15,/**< Lost connection to server */
     277        TRACE_RT_SERVERSTART    =16,/**< Server has been restarted */
     278        TRACE_RT_CLIENTDROP     =17,/**< Reliable client was lost */
    275279
    276280        TRACE_RT_DATA_SIMPLE    = 1000, /**< Trace types that know their link
  • tools/tracereport/error_report.c

    r853603a ra1b899f  
    1818                ++rx_errors;
    1919        }
     20       
     21        /* This isn't quite as simple as it seems.
     22         *
     23         * If the packets were captured via wdcap's anonymisation module,
     24         * the checksum is set to 1 when it is correct and 0 if incorrect.
     25         *
     26         * Earlier versions of wdcap appear to set the checksum the other
     27         * way around.
     28         *
     29         * If a different capture method is used, there's a good chance the
     30         * checksum has not been altered
     31         */
    2032        if (ip) {
    2133                if (ntohs(ip->ip_sum)!=0)
  • tools/tracereport/synopt_report.c

    r3bfeb7d ra1b899f  
    2525        uint64_t mt;
    2626        uint64_t all_four;
     27        uint64_t ts_and_sack;
     28        uint64_t wt;
     29        uint64_t tms;
     30        uint64_t tws;
     31        uint64_t tmw;
    2732        uint64_t ts_and_another;
    2833        uint64_t ttcp;
     
    3035};
    3136
    32 struct opt_counter counts = {0,0,0,0,0,0,0,0,0,0,0};
     37struct opt_counter counts = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    3338uint64_t total_syns = 0;
    3439
     
    6368        if (opts.mss && opts.ts && !opts.winscale && !opts.sack)
    6469                counts.mt ++;
     70        if (opts.ts && opts.sack && !opts.mss && !opts.winscale)
     71                counts.ts_and_sack ++;
     72
     73        if (opts.ts && opts.winscale && !opts.mss && !opts.sack)
     74                counts.wt ++;
     75
     76        if (opts.ts && opts.mss && opts.winscale && !opts.sack)
     77                counts.tmw ++;
     78        if (opts.ts && opts.mss && opts.sack && !opts.winscale)
     79                counts.tms ++;
     80        if (opts.ts && opts.sack && opts.winscale && !opts.mss)
     81                counts.tws ++;
     82       
     83       
    6584        if (opts.mss && opts.sack && opts.winscale && opts.ts) {
    6685                counts.all_four ++;
     
    170189                        (double)(counts.mt) / total_syns * 100.0);
    171190        fprintf(out, "%-20s\t%.2f%%\n",
     191                        "W, T",
     192                        (double)(counts.wt) / total_syns * 100.0);
     193        fprintf(out, "%-20s\t%.2f%%\n",
     194                        "S, T",
     195                        (double)(counts.ts_and_sack) / total_syns * 100.0);
     196        fprintf(out, "%-20s\t%.2f%%\n",
     197                        "S, M, T",
     198                        (double)(counts.tms) / total_syns * 100.0);
     199        fprintf(out, "%-20s\t%.2f%%\n",
     200                        "W, M, T",
     201                        (double)(counts.tmw) / total_syns * 100.0);
     202        fprintf(out, "%-20s\t%.2f%%\n",
     203                        "S, W, T",
     204                        (double)(counts.tws) / total_syns * 100.0);
     205        fprintf(out, "%-20s\t%.2f%%\n",
    172206                        "M, S, W and T",
    173207                        (double)(counts.all_four) / total_syns * 100.0);
Note: See TracChangeset for help on using the changeset viewer.