Changeset 1c68a81


Ignore:
Timestamp:
12/30/07 11:44:58 (13 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:
7641ce8
Parents:
1066d75
Message:

Split "have bpf filtering" and "bpf socket" support apart

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • config-win.h

    r6ed6c4a r1c68a81  
    1212#define HAVE_LIBPCAP 1
    1313#define HAVE_PCAP 1
    14 #define HAVE_BPF 1
     14#define HAVE_BPF_FILTER 1
    1515#define HAVE_PCAP_H 1
    1616#define HAVE_PCAP_BPF_H 1
  • configure.in

    rb282cf8 r1c68a81  
    44# and in the README
    55
    6 AC_INIT([libtrace],[3.0.3],[contact@wand.net.nz],[libtrace])
     6AC_INIT([libtrace],[3.0.4],[contact@wand.net.nz],[libtrace])
    77
    88LIBTRACE_MAJOR=3
     
    148148        ADD_LIBS="$ADD_LIBS -lpcap"
    149149        AC_DEFINE([HAVE_LIBPCAP],1,[compile with libpcap support])
     150        AC_DEFINE([HAVE_BPF_FILTER],1,[compile with bpf filter support])
    150151fi
    151152
     
    245246AC_CHECK_LIB(z, gzopen)
    246247
    247 AM_CONDITIONAL([HAVE_BPF], [test "$ac_cv_have_decl_BIOCSETIF" = yes ])
     248AM_CONDITIONAL([HAVE_BPF_CAPTURE], [test "$ac_cv_have_decl_BIOCSETIF" = yes ])
    248249AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true])
    249250AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag_version" = 24])
     
    258259
    259260AM_CONDITIONAL(HAS_DOXYGEN, [test x"$libtrace_doxygen" = xtrue])
    260 
    261261
    262262AC_SUBST([ADD_LIBS])
     
    270270AC_SUBST([LIBTRACE_MINOR])
    271271AC_SUBST([DAG_VERSION_NUM])
     272AC_SUBST([HAVE_BPF_CAPTURE])
    272273dnl and finally, output our Makefiles
    273274AC_OUTPUT
  • lib/Makefile.am

    re53fbe1 r1c68a81  
    99endif
    1010
    11 if HAVE_BPF
     11if HAVE_BPF_CAPTURE
    1212BPFFORMATS=format_bpf.c
    1313else
  • lib/trace.c

    r50bbce8 r1c68a81  
    231231                pcap_constructor();
    232232#endif
    233 #ifdef HAVE_BIOCSETIF
     233#if HAVE_DECL_BIOCSETIF
    234234                bpf_constructor();
    235235#endif
     
    10081008trace_create_filter_from_bytecode(void *bf_insns, unsigned int bf_len)
    10091009{
    1010 #ifndef HAVE_BPF
     1010#ifndef HAVE_BPF_FILTER
    10111011        fprintf(stderr, "This version of libtrace does not have BPF support\n");
    10121012        return NULL;
     
    10351035 */
    10361036DLLEXPORT libtrace_filter_t *trace_create_filter(const char *filterstring) {
    1037 #ifdef HAVE_BPF
     1037#ifdef HAVE_BPF_FILTER
    10381038        libtrace_filter_t *filter = (libtrace_filter_t*)
    10391039                                malloc(sizeof(libtrace_filter_t));
     
    10491049DLLEXPORT void trace_destroy_filter(libtrace_filter_t *filter)
    10501050{
    1051 #ifdef HAVE_BPF
     1051#ifdef HAVE_BPF_FILTER
    10521052        free(filter->filterstring);
    10531053        if (filter->flag)
     
    10661066int trace_bpf_compile(libtrace_filter_t *filter,
    10671067                const libtrace_packet_t *packet ) {
    1068 #ifdef HAVE_BPF
     1068#ifdef HAVE_BPF_FILTER
    10691069        void *linkptr = 0;
    10701070        libtrace_linktype_t linktype;
     
    11201120DLLEXPORT int trace_apply_filter(libtrace_filter_t *filter,
    11211121                        const libtrace_packet_t *packet) {
    1122 #ifdef HAVE_BPF
     1122#ifdef HAVE_BPF_FILTER
    11231123        void *linkptr = 0;
    11241124        uint32_t clen = 0;
Note: See TracChangeset for help on using the changeset viewer.