eBPF for Windows
Data Structures | Macros | Typedefs | Functions
bpf2c.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "ebpf_structs.h"

Go to the source code of this file.

Data Structures

struct  _helper_function_entry
 
struct  _map_entry
 
struct  _program_entry
 
struct  _metadata_table
 

Macros

#define UBPF_STACK_SIZE   512
 
#define IMMEDIATE(X)   (int32_t) X
 
#define OFFSET(X)   (int16_t) X
 
#define POINTER(X)   (uint64_t)(X)
 
#define htobe16(X)   swap16(X)
 
#define htobe32(X)   swap32(X)
 
#define htobe64(X)   swap64(X)
 
#define htole16(X)   (X)
 
#define htole32(X)   (X)
 
#define htole64(X)   (X)
 

Typedefs

typedef struct _helper_function_entry helper_function_entry_t
 
typedef struct _map_entry map_entry_t
 
typedef struct _program_entry program_entry_t
 
typedef struct _metadata_table metadata_table_t
 

Functions

uint16_t swap16 (uint16_t value)
 
uint32_t swap32 (uint32_t value)
 
uint64_t swap64 (uint64_t value)
 
void division_by_zero (uint32_t address)
 

Macro Definition Documentation

◆ htobe16

#define htobe16 (   X)    swap16(X)

◆ htobe32

#define htobe32 (   X)    swap32(X)

◆ htobe64

#define htobe64 (   X)    swap64(X)

◆ htole16

#define htole16 (   X)    (X)

◆ htole32

#define htole32 (   X)    (X)

◆ htole64

#define htole64 (   X)    (X)

◆ IMMEDIATE

#define IMMEDIATE (   X)    (int32_t) X

◆ OFFSET

#define OFFSET (   X)    (int16_t) X

◆ POINTER

#define POINTER (   X)    (uint64_t)(X)

◆ UBPF_STACK_SIZE

#define UBPF_STACK_SIZE   512

Typedef Documentation

◆ helper_function_entry_t

◆ map_entry_t

typedef struct _map_entry map_entry_t

◆ metadata_table_t

◆ program_entry_t

Function Documentation

◆ division_by_zero()

void division_by_zero ( uint32_t  address)

◆ swap16()

uint16_t swap16 ( uint16_t  value)
inline

◆ swap32()

uint32_t swap32 ( uint32_t  value)
inline

◆ swap64()

uint64_t swap64 ( uint64_t  value)
inline