Changeset 2c124cf


Ignore:
Timestamp:
02/18/08 11:07:23 (13 years ago)
Author:
Brendon Jones <brendonj@…>
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:
e59cbb4
Parents:
95fee28
Message:

"interface" is a reserved word in Windows, renamed it to "iface". This
will break the API for anyone doing interface stuff in tsh traces... anyone?

Windows also needs the size to be explicit when doing pointer arithmetic,
void pointers need to be cast to something other than void.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_tsh.c

    rf3f3558 r2c124cf  
    5050typedef struct tsh_pkt_header_t {
    5151        uint32_t seconds;
    52         LT_BITFIELD32 interface:8;
     52        LT_BITFIELD32 iface:8;
    5353        LT_BITFIELD32 usecs:24;
    5454} tsh_pkt_header_t;
     
    121121        }
    122122
    123         buffer2+=numbytes;
     123        (char*)buffer2 += numbytes;
    124124        packet->payload = buffer2;
    125125
     
    137137         * for them, and put the transport header where it "should" be
    138138         */
    139         buffer2+=((libtrace_ip_t*)buffer2)->ip_hl*4;
     139        (char*)buffer2 += ((libtrace_ip_t*)buffer2)->ip_hl*4;
    140140
    141141        /* Read the transport header */
     
    156156
    157157static libtrace_direction_t tsh_get_direction(const libtrace_packet_t *packet) {
    158         return ((tsh_pkt_header_t*)(packet->header))->interface;
     158        return ((tsh_pkt_header_t*)(packet->header))->iface;
    159159}
    160160
Note: See TracChangeset for help on using the changeset viewer.