Changeset 7c8eacf for lib/format_wag.c


Ignore:
Timestamp:
10/27/05 14:05:36 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
2458162
Parents:
0d82205
Message:

updated changelog
added trace_get_framing_length() to return the capture-format framing (eg, ERF or pcap headers).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    r17ffb8a r7c8eacf  
    8888#endif
    8989
    90 static struct libtrace_format_t *wag_ptr = 0;
     90extern struct libtrace_format_t wag;
    9191
    9292#define CONNINFO libtrace->format_data->conn_info
     
    334334static int wag_write_packet(struct libtrace_out_t *libtrace, const struct libtrace_packet_t *packet) {
    335335        int numbytes =0 ;
    336         if (packet->trace->format != wag_ptr) {
     336        if (packet->trace->format != &wag) {
    337337                fprintf(stderr,"Cannot convert from wag to %s format yet\n",
    338338                                packet->trace->format->name);
     
    384384        //return (wagptr->hdr.size);
    385385        return ntohs(wagptr->hdr.size);
     386}
     387
     388static int wag_get_framing_length(const struct libtrace_packet_t *packet) {
     389        return sizeof(struct wag_data_frame);
    386390}
    387391
     
    433437        wag_get_capture_length,         /* get_capture_length */
    434438        wag_get_wire_length,            /* get_wire_length */
     439        wag_get_framing_length,         /* get_framing_length */
    435440        NULL,                           /* set_capture_length */
    436441        wag_get_fd,                     /* get_fd */
     
    440445
    441446void __attribute__((constructor)) wag_constructor() {
    442         wag_ptr = &wag;
    443         register_format(wag_ptr);
    444 }
     447        register_format(&wag);
     448}
Note: See TracChangeset for help on using the changeset viewer.