P4C
The P4 Compiler
Loading...
Searching...
No Matches
ebpf_runtime_test.h
1/*
2 * Copyright 2018 VMware, Inc.
3 * SPDX-FileCopyrightText: 2018 VMware, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
11#ifndef BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_TEST_H_
12#define BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_TEST_H_
13
14#include "pcap_util.h"
15#include "ebpf_test.h"
16
17typedef int (*packet_filter)(SK_BUFF* s);
18
19void *run_and_record_output(packet_filter ebpf_filter, const char *pcap_base, pcap_list_t *pkt_list, int debug);
20void init_ebpf_tables(int debug);
21void delete_ebpf_tables(int debug);
22
23#define RUN(ebpf_filter, pcap_base, num_pcaps, input_list, debug) \
24 run_and_record_output(ebpf_filter, pcap_base, input_list, debug)
25#define INIT_EBPF_TABLES(debug) init_ebpf_tables(debug)
26#define DELETE_EBPF_TABLES(debug) delete_ebpf_tables(debug)
27
28#endif // BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_TEST_H_