Changeset 41b53c2 for lib


Ignore:
Timestamp:
11/03/05 17:17:41 (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:
fe3d755
Parents:
117e83b
Message:

2.0.25

Fixes for builds under openbsd:

  • pcap uses a struct bpf_filter, not struct timeval. fixed format_pcap to solve this
  • #includes in libpacketdump - libpacketdump still not working properly
  • rijndael.c and .h conflicted with a system function called 'encrypt' - renamed encrypt and decrypt to r_* within rijndael*
  • UINT64_MAX not defined under freebsd
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.am

    ra3505a8 r41b53c2  
    1111INCLUDES = @ADD_INCLS@
    1212libtrace_la_LIBADD = @ADD_LIBS@ @LTLIBOBJS@
    13 libtrace_la_LDFLAGS=-version-info 2:24:0 @ADD_LDFLAGS@
     13libtrace_la_LDFLAGS=-version-info 2:25:0 @ADD_LDFLAGS@
    1414
    1515dagapi.c:
  • lib/format_pcap.c

    r8013711 r41b53c2  
    238238
    239239        if (!OUTPUT.trace.pcap) {
    240                 OUTPUT.trace.pcap = pcap_open_dead(
     240                OUTPUT.trace.pcap = (pcap_t *)pcap_open_dead(
    241241                                linktype_to_dlt(trace_get_link_type(packet)),
    242242                                65536);
     
    249249                pcap_dump((u_char*)OUTPUT.trace.dump,(struct pcap_pkthdr *)packet->buffer,link);
    250250        } else {
    251                 pcap_pkt_hdr.ts = trace_get_timeval(packet);
     251                // Leave the manual copy as it is, as it gets around
     252                // some OS's having different structures in pcap_pkt_hdr
     253                struct timeval ts = trace_get_timeval(packet);
     254                pcap_pkt_hdr.ts.tv_sec = ts.tv_sec;
     255                pcap_pkt_hdr.ts.tv_usec = ts.tv_usec;
    252256                pcap_pkt_hdr.caplen = trace_get_capture_length(packet);
    253257                pcap_pkt_hdr.len = trace_get_wire_length(packet);
     
    347351
    348352
    349 static struct timeval pcap_get_timeval(const struct libtrace_packet_t *packet) { 
     353static struct timeval pcap_get_timeval(const struct libtrace_packet_t *packet) {
    350354        struct pcap_pkthdr *pcapptr = (struct pcap_pkthdr *)packet->buffer;
    351         return pcapptr->ts;
     355        struct timeval ts;
     356        ts.tv_sec = pcapptr->ts.tv_sec;
     357        ts.tv_usec = pcapptr->ts.tv_usec;
     358        return ts;
    352359}
    353360
Note: See TracChangeset for help on using the changeset viewer.