n-acd-bpf-fallback.c 698 Bytes
Newer Older
1 2 3
/*
 * A noop implementation of eBPF filter for IPv4 Address Conflict Detection
 *
4
 * These are a collection of dummy functions that have no effect, but allows
5 6 7 8 9
 * n-acd to compile without eBPF support.
 *
 * See n-acd-bpf.c for documentation.
 */

10
#include <c-stdaux.h>
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#include <stddef.h>
#include "n-acd-private.h"

int n_acd_bpf_map_create(int *mapfdp, size_t max_entries) {
        *mapfdp = -1;
        return 0;
}

int n_acd_bpf_map_add(int mapfd, struct in_addr *addrp) {
        return 0;
}

int n_acd_bpf_map_remove(int mapfd, struct in_addr *addrp) {
        return 0;
}

int n_acd_bpf_compile(int *progfdp, int mapfd, struct ether_addr *macp) {
        *progfdp = -1;
        return 0;
}