2021-06-09 18:44:24 +03:00
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
// This file contains eBPF definitions common to eBPF core libraries as well as
|
|
|
|
// the eBPF API library.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-06-10 06:28:23 +03:00
|
|
|
#include <sal.h>
|
2021-06-09 18:44:24 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include "ebpf_structs.h"
|
|
|
|
|
|
|
|
#define EBPF_MAX_PIN_PATH_LENGTH 256
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief eBPF Map Information
|
|
|
|
*/
|
2021-07-07 21:16:35 +03:00
|
|
|
typedef struct _ebpf_map_info
|
2021-06-09 18:44:24 +03:00
|
|
|
{
|
2021-08-31 05:14:08 +03:00
|
|
|
ebpf_map_definition_in_memory_t definition;
|
2021-06-09 18:44:24 +03:00
|
|
|
_Field_z_ char* pin_path;
|
2021-07-07 21:16:35 +03:00
|
|
|
} ebpf_map_info_t;
|
2021-09-14 18:25:56 +03:00
|
|
|
|
|
|
|
typedef intptr_t ebpf_handle_t;
|
|
|
|
extern __declspec(selectany) const ebpf_handle_t ebpf_handle_invalid = (ebpf_handle_t)-1;
|
2021-12-04 00:19:21 +03:00
|
|
|
|
|
|
|
typedef struct _ebpf_ring_buffer_map_async_query_result
|
|
|
|
{
|
|
|
|
size_t producer;
|
|
|
|
size_t consumer;
|
|
|
|
} ebpf_ring_buffer_map_async_query_result_t;
|