Changeset c66068d for lib/format_tsh.c


Ignore:
Timestamp:
12/03/08 13:24:55 (13 years ago)
Author:
Perry Lorier <perry@…>
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:
f66a2dca
Parents:
7157db8
Message:

Rewrite the libtrace io subsystem to use the new wandio abstraction layer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_tsh.c

    r5d4e520 rc66068d  
    4545
    4646struct tsh_format_data_t {
    47         libtrace_io_t *file;
     47        io_t *file;
    4848};
    4949
     
    8383static int tsh_fin_input(libtrace_t *libtrace) {
    8484        if (DATA(libtrace)->file)
    85                 libtrace_io_close(DATA(libtrace)->file);
     85                wandio_destroy(DATA(libtrace)->file);
    8686        free(libtrace->format_data);
    8787        return 0;
     
    134134
    135135        /* Read the TSH header */
    136         if ((numbytes=libtrace_io_read(DATA(libtrace)->file,
     136        if ((numbytes=wandio_read(DATA(libtrace)->file,
    137137                                        buffer2,
    138138                                        (size_t)sizeof(tsh_pkt_header_t))) == -1) {
     
    149149
    150150        /* Read the IP header */
    151         if ((numbytes=libtrace_io_read(DATA(libtrace)->file,
     151        if ((numbytes=wandio_read(DATA(libtrace)->file,
    152152                                buffer2,
    153153                                (size_t)sizeof(libtrace_ip_t)))
     
    164164
    165165        /* Read the transport header */
    166         if ((numbytes=libtrace_io_read(DATA(libtrace)->file,
     166        if ((numbytes=wandio_read(DATA(libtrace)->file,
    167167                                buffer2,
    168168                                16)) != 16) {
Note: See TracChangeset for help on using the changeset viewer.