Changeset c0dba7a for lib/format_bpf.c


Ignore:
Timestamp:
04/02/08 16:26:47 (13 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:
007fb43
Parents:
590fb30
Message:
  • Fixed compile error on systems where bh_tstamp in the bpf header is a bpf_timeval rather than a timeval, e.g. OpenBSD ( Reported by Niclas Rosell )
  • Updated all formats that require it to use the new "Do not own the buffer" prepare_packet flag
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_bpf.c

    rf0fb38f rc0dba7a  
    353353                                FORMATIN(libtrace)->buffer;
    354354        }
    355 
     355        flags |= TRACE_PREP_DO_NOT_OWN_BUFFER;
    356356        /* Read one packet out */
    357357       
     
    388388{
    389389        struct timeval tv;
    390         tv=BPFHDR(packet)->bh_tstamp;
     390        /* OpenBSD uses a bpf_timeval rather than a timeval so we must copy
     391         * each timeval element individually rather than doing a structure
     392         * assignment */
     393        tv.tv_sec = BPFHDR(packet)->bh_tstamp.tv_sec;
     394        tv.tv_usec = BPFHDR(packet)->bh_tstamp.tv_usec;
     395
    391396        return tv;
    392397}
Note: See TracChangeset for help on using the changeset viewer.