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

Go to the source code of this file.

Data Structures

struct  bpf_obj_info_attr_t
 Attributes used by BPF_OBJ_GET_INFO_BY_FD. More...
 
struct  bpf_link_detach_attr_t
 Attributes used by BPF_LINK_DETACH. More...
 
struct  bpf_prog_bind_map_attr_t
 Attributes used by BPF_PROG_BIND_MAP. More...
 
union  bpf_attr
 Parameters used by the bpf() API. More...
 

Macros

#define __SIZEOF_SIZE_T__   8 /* only x64 is supported */
 
#define __SIZEOF_LONG_LONG__   8 /* only x64 is supported */
 

Typedefs

typedef int32_t s32
 
typedef uint8_t u8
 
typedef uint32_t u32
 
typedef uint64_t u64
 
typedef int32_t __s32
 
typedef uint8_t __u8
 
typedef uint32_t __u32
 
typedef uint64_t __u64
 
typedef uint32_t pid_t
 

Enumerations

enum  bpf_func_id { BPF_FUNC_ID_UNKNOWN }
 
enum  bpf_stats_type { BPF_STATS_TYPE_UNKNOWN }
 
enum  bpf_cmd_id {
  BPF_MAP_CREATE , BPF_MAP_LOOKUP_ELEM , BPF_MAP_UPDATE_ELEM , BPF_MAP_DELETE_ELEM ,
  BPF_MAP_GET_NEXT_KEY , BPF_PROG_LOAD , BPF_OBJ_PIN , BPF_OBJ_GET ,
  BPF_PROG_ATTACH , BPF_PROG_DETACH , BPF_PROG_GET_NEXT_ID , BPF_MAP_GET_NEXT_ID ,
  BPF_LINK_GET_NEXT_ID , BPF_PROG_GET_FD_BY_ID , BPF_MAP_GET_FD_BY_ID , BPF_MAP_LOOKUP_AND_DELETE_ELEM ,
  BPF_LINK_GET_FD_BY_ID , BPF_OBJ_GET_INFO_BY_FD , BPF_LINK_DETACH , BPF_PROG_BIND_MAP ,
  BPF_PROG_TEST_RUN , BPF_PROG_RUN = BPF_PROG_TEST_RUN
}
 

Functions

int bpf (int cmd, union bpf_attr *attr, unsigned int size)
 

Macro Definition Documentation

◆ __SIZEOF_LONG_LONG__

#define __SIZEOF_LONG_LONG__   8 /* only x64 is supported */

◆ __SIZEOF_SIZE_T__

#define __SIZEOF_SIZE_T__   8 /* only x64 is supported */

Typedef Documentation

◆ __s32

typedef int32_t __s32

◆ __u32

typedef uint32_t __u32

◆ __u64

typedef uint64_t __u64

◆ __u8

typedef uint8_t __u8

◆ pid_t

typedef uint32_t pid_t

◆ s32

typedef int32_t s32

◆ u32

typedef uint32_t u32

◆ u64

typedef uint64_t u64

◆ u8

typedef uint8_t u8

Enumeration Type Documentation

◆ bpf_cmd_id

enum bpf_cmd_id
Enumerator
BPF_MAP_CREATE 
BPF_MAP_LOOKUP_ELEM 
BPF_MAP_UPDATE_ELEM 
BPF_MAP_DELETE_ELEM 
BPF_MAP_GET_NEXT_KEY 
BPF_PROG_LOAD 
BPF_OBJ_PIN 
BPF_OBJ_GET 
BPF_PROG_ATTACH 
BPF_PROG_DETACH 
BPF_PROG_GET_NEXT_ID 
BPF_MAP_GET_NEXT_ID 
BPF_LINK_GET_NEXT_ID 
BPF_PROG_GET_FD_BY_ID 
BPF_MAP_GET_FD_BY_ID 
BPF_MAP_LOOKUP_AND_DELETE_ELEM 
BPF_LINK_GET_FD_BY_ID 
BPF_OBJ_GET_INFO_BY_FD 
BPF_LINK_DETACH 
BPF_PROG_BIND_MAP 
BPF_PROG_TEST_RUN 
BPF_PROG_RUN 

◆ bpf_func_id

Enumerator
BPF_FUNC_ID_UNKNOWN 

◆ bpf_stats_type

Enumerator
BPF_STATS_TYPE_UNKNOWN 

Function Documentation

◆ bpf()

int bpf ( int  cmd,
union bpf_attr attr,
unsigned int  size 
)