P4C
The P4 Compiler
 
Loading...
Searching...
No Matches
ebpf_runtime_kernel.h
1/*
2Copyright 2018 VMware, Inc.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17/*
18 * Runtime operations specific to the kernel target. Opens a raw socket per
19 * interface, launches a tcpdump packet listener, and writes packets to a
20 * virtual interface. The successful output is recorded by tcpdump and written
21 * to file.
22 */
23
24#ifndef BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_KERNEL_H_
25#define BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_KERNEL_H_
26
27#include "pcap_util.h"
28#include "ebpf_runtime_kernel.h"
29
30void run_and_record_output(pcap_list_t *pkt_list, char *pcap_base, uint16_t num_pcaps, int debug);
31
32#define RUN(ebpf_filter, pcap_base, num_pcaps, input_list, debug) \
33 run_and_record_output(input_list, pcap_base, num_pcaps, debug)
34#define INIT_EBPF_TABLES(debug)
35#define DELETE_EBPF_TABLES(debug)
36
37#endif // BACKENDS_EBPF_RUNTIME_EBPF_RUNTIME_KERNEL_H_