Skip to content

Commit

Permalink
fix netevent_sim
Browse files Browse the repository at this point in the history
  • Loading branch information
Laksh Kotian committed Dec 3, 2024
1 parent 1c34293 commit 1b5a7e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
19 changes: 12 additions & 7 deletions tests/neteventebpfext/netevent_sim/netevent_npi_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ typedef struct
} netevent_event_info_t;
typedef void (*netevent_push_event)(netevent_event_info_t*);

// This is the type definition for the eBPF helper function addresses
// when version is EBPF_HELPER_FUNCTION_ADDRESSES_CURRENT_VERSION.
typedef struct _ebpf_helper_function_addresses
typedef struct netevent_ext_header
{
ebpf_extension_header_t header;
UINT32 helper_function_count;
UINT64* helper_function_address;
} ebpf_helper_function_addresses_t;
uint16_t version; ///< Version of the extension data structure.
size_t size; ///< Size of the netevent function addresses structure.
} netevent_ext_header_t;

// This is the type definition for the netevent helper function addresses.
typedef struct netevent_ext_function_addresses
{
netevent_ext_header_t header;
uint32_t helper_function_count;
uint64_t* helper_function_address;
} netevent_ext_function_addresses_t;
8 changes: 4 additions & 4 deletions tests/neteventebpfext/netevent_sim/netevent_npi_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ typedef struct PROVIDER_REGISTRATION_CONTEXT_
// Define the context structure for the provider module's binding to a client module
typedef struct PROVIDER_BINDING_CONTEXT_
{
HANDLE client_binding_handle; // Handle of the attached client
const ebpf_helper_function_addresses_t* client_dispatch; // Dispatch routines addresses of the attached client
PNPI_REGISTRATION_INSTANCE client_registration_instance; // Registration instance of the attached client
void* client_binding_context; // Binding context of the attached client
HANDLE client_binding_handle; // Handle of the attached client
const netevent_ext_function_addresses_t* client_dispatch; // Dispatch routines addresses of the attached client
PNPI_REGISTRATION_INSTANCE client_registration_instance; // Registration instance of the attached client
void* client_binding_context; // Binding context of the attached client
} PROVIDER_BINDING_CONTEXT;

0 comments on commit 1b5a7e2

Please sign in to comment.