17#ifndef P4C_EBPF_RUNTIME_UBPF_H 
   18#define P4C_EBPF_RUNTIME_UBPF_H 
   21#include "../../ebpf/runtime/pcap_util.h" 
   22#include "../../ebpf/runtime/ebpf_registry.h" 
   25struct standard_metadata;
 
   27extern uint64_t entry(
void *, 
struct standard_metadata *);
 
   28typedef uint64_t (*packet_filter)(
void *dp, 
struct standard_metadata *std_meta);
 
   30void *run_and_record_output(packet_filter entry, 
const char *pcap_base, pcap_list_t *pkt_list, 
int debug);
 
   32static void inline init_ubpf_table_test(
char *name, 
unsigned int key_size, 
unsigned int value_size) {
 
   37        .value_size = value_size,
 
   44#define ubpf_printf(fmt, args) \ 
   45    ubpf_printf_test(fmt, args) 
   46#define ubpf_packet_data(ctx) \ 
   47    ubpf_packet_data_test(ctx) 
   48#define ubpf_adjust_head(ctx, ofs) \ 
   49    ubpf_adjust_head_test(ctx, ofs) 
   50#define ubpf_truncate_packet(ctx, maxlen) \ 
   51    ubpf_truncate_packet_test(ctx, maxlen) 
   52#define ubpf_map_lookup(table, key) \ 
   53    registry_lookup_table_elem(#table, key) 
   54#define ubpf_map_update(table, key, value) \ 
   55    registry_update_table(#table, key, value, 0) 
   57#define INIT_UBPF_TABLE(name, key_size, value_size) init_ubpf_table_test("&"name, key_size, value_size) 
   59#define RUN(entry, pcap_base, num_pcaps, input_list, debug) \ 
   60    run_and_record_output(entry, pcap_base, input_list, debug) 
   61#define INIT_EBPF_TABLES(debug) 
   62#define DELETE_EBPF_TABLES(debug) 
A helper structure used to describe attributes.
Definition ebpf_registry.h:36