Changeset 1c68a81 for lib/trace.c


Ignore:
Timestamp:
12/30/07 11:44:58 (14 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.