ebpf-for-windows/ebpfsvc/rpc_interface.idl

72 строки
1.8 KiB
Plaintext

/*
* Copyright (c) Microsoft Corporation
* SPDX-License-Identifier: MIT
*/
#include "ebpf_result.h"
#include "ebpf_execution_context.h"
import "stdint.h";
import "wtypes.idl";
//
// Interface Attributes
//
[
uuid(6bef171d-7205-4b63-a1e5-d00f01e6a0c1),
version(1.0),
pointer_default(unique)
]
interface ebpf_service_interface
{
// eBPF instruction is 64-bit.
typedef uint64_t ebpf_instruction;
typedef [system_handle(sh_file)] HANDLE file_handle_t;
typedef struct _fd_handle_map
{
uint32_t file_descriptor;
file_handle_t handle;
} fd_handle_map;
typedef struct _ebpf_program_load_info
{
// Optional file name with full path.
[string] char* file_name;
// Optional program name.
[string] char* program_name;
GUID program_type;
file_handle_t program_handle;
ebpf_execution_context_t execution_context;
uint32_t map_count;
[size_is(map_count)] fd_handle_map* handle_map;
uint32_t instruction_count;
[size_is(instruction_count)] ebpf_instruction* instructions;
} ebpf_program_load_info;
typedef struct _ebpf_program_verify_info
{
GUID program_type;
ebpf_execution_context_t execution_context;
uint32_t map_count;
[size_is(map_count)] fd_handle_map* handle_map;
uint32_t instruction_count;
[size_is(instruction_count)] ebpf_instruction* instructions;
} ebpf_program_verify_info;
ebpf_result_t
ebpf_verify_and_jit_program(
[in] ebpf_program_load_info* info,
[out] uint32_t* logs_size,
[out, size_is(,*logs_size)]char** logs);
ebpf_result_t
ebpf_verify_program(
[in] ebpf_program_verify_info* info,
[out] uint32_t* logs_size,
[out, size_is(,*logs_size)]char** logs);
}