Eunomia  0.1.0
A lightweight eBPF-based CloudNative Monitor tool for Container Security and Observability
uprobe_helpers.c File Reference
#include <errno.h>
#include <fcntl.h>
#include <gelf.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
Include dependency graph for uprobe_helpers.c:

Macros

#define _GNU_SOURCE
 
#define warn(...)   fprintf(stderr, __VA_ARGS__)
 

Functions

int get_pid_binary_path (pid_t pid, char *path, size_t path_sz)
 
int get_pid_lib_path (pid_t pid, const char *lib, char *path, size_t path_sz)
 
int resolve_binary_path (const char *binary, pid_t pid, char *path, size_t path_sz)
 
Elf * open_elf (const char *path, int *fd_close)
 
Elf * open_elf_by_fd (int fd)
 
void close_elf (Elf *e, int fd_close)
 
off_t get_elf_func_offset (const char *path, const char *func)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ warn

#define warn (   ...)    fprintf(stderr, __VA_ARGS__)

Function Documentation

◆ close_elf()

void close_elf ( Elf *  e,
int  fd_close 
)
Here is the caller graph for this function:

◆ get_elf_func_offset()

off_t get_elf_func_offset ( const char *  path,
const char *  func 
)
Here is the call graph for this function:

◆ get_pid_binary_path()

int get_pid_binary_path ( pid_t  pid,
char *  path,
size_t  path_sz 
)
Here is the caller graph for this function:

◆ get_pid_lib_path()

int get_pid_lib_path ( pid_t  pid,
const char *  lib,
char *  path,
size_t  path_sz 
)
Here is the caller graph for this function:

◆ open_elf()

Elf* open_elf ( const char *  path,
int *  fd_close 
)
Here is the caller graph for this function:

◆ open_elf_by_fd()

Elf* open_elf_by_fd ( int  fd)

◆ resolve_binary_path()

int resolve_binary_path ( const char *  binary,
pid_t  pid,
char *  path,
size_t  path_sz 
)
Here is the call graph for this function: