Changeset 17ffb8a for lib


Ignore:
Timestamp:
10/21/05 15:06:26 (16 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:
006bbf7
Parents:
41660d5
Message:
  • Fixed packed vs packed issues
  • Fixed wrong prototype for format_wag
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    r641dc7c r17ffb8a  
    332332}
    333333
    334 static int wag_write_packet(struct libtrace_out_t *libtrace, struct libtrace_packet_t *packet) {
     334static int wag_write_packet(struct libtrace_out_t *libtrace, const struct libtrace_packet_t *packet) {
    335335        int numbytes =0 ;
    336336        if (packet->trace->format != wag_ptr) {
  • lib/libtrace.h

    ra2a1fa5 r17ffb8a  
    122122    struct in_addr ip_src;              /**< source address */
    123123    struct in_addr ip_dst;              /**< dest address */
    124 } __attribute__ ((__packed__));
     124} __attribute__ ((packed));
    125125
    126126/** Structure for dealing with TCP packets */
     
    157157    u_int16_t check;            /**< Checksum */
    158158    u_int16_t urg_ptr;          /**< Urgent Pointer */
    159 } __attribute__ ((__packed__));
     159} __attribute__ ((packed));
    160160
    161161/** UDP Header for dealing with UDP packets */
     
    165165  u_int16_t     len;            /**< Length */
    166166  u_int16_t     check;          /**< Checksum */
    167 } __attribute__ ((__packed__));
     167} __attribute__ ((packed));
    168168
    169169/** ICMP Header for dealing with icmp packets */
     
    187187    } frag;                     /**< path mtu discovery */
    188188  } un;                         /**< Union for payloads of various icmp codes */
    189 } __attribute__ ((__packed__));
     189} __attribute__ ((packed));
    190190
    191191/** 802.3 frame */
     
    195195  u_int8_t ether_shost[6];      /* source ether addr */
    196196  u_int16_t ether_type;         /* packet type ID field (next-header) */
    197 } __attribute__ ((__packed__));
     197} __attribute__ ((packed));
    198198
    199199/** 802.1Q frame */
     
    207207  u_int16_t vlan_id:12;          /* vlan id */
    208208  u_int16_t vlan_ether_type;     /* vlan sub-packet type ID field (next-header)*/
    209 } __attribute__ ((__packed__));
     209} __attribute__ ((packed));
    210210
    211211/** Prints help information for libtrace
Note: See TracChangeset for help on using the changeset viewer.