clsync
Loading...
Searching...
No Matches
mon_dtracepipe.c File Reference
#include "common.h"
#include "malloc.h"
#include "error.h"
#include "indexes.h"
#include "sync.h"
#include "mon_dtracepipe.h"
Include dependency graph for mon_dtracepipe.c:

Go to the source code of this file.

Data Structures

struct  mondata
 

Macros

#define DTRACE_SCRIPT   "BEGIN\{\ dir = $1;\ dirlen = strlen(dir);\}\\syscall::open*:entry\/\arg1 & (O_WRONLY|O_RDWR) &&\ substr(copyinstr(arg0),0,dirlen)==dir\/\{\ printf("%s\n",copyinstr(arg0));\}\\syscall::mkdir*:entry\/\ substr(copyinstr(arg0),0,dirlen)==dir\/\{\ printf("%s\n",copyinstr(arg0));\}"
 
#define DTRACEPIPE_INIT_ERROR
 

Functions

int dtracepipe_init (ctx_t *ctx_p)
 
int dtracepipe_wait (struct ctx *ctx_p, struct indexes *indexes_p, struct timeval *timeout_p)
 
int dtracepipe_handle (struct ctx *ctx_p, struct indexes *indexes_p)
 
int dtracepipe_add_watch_dir (struct ctx *ctx_p, struct indexes *indexes_p, const char *const accpath)
 
int dtracepipe_deinit (ctx_t *ctx_p)
 

Variables

char * dtracepipe_wait_line = NULL
 
size_t dtracepipe_wait_line_siz
 

Macro Definition Documentation

◆ DTRACE_SCRIPT

#define DTRACE_SCRIPT   "BEGIN\{\ dir = $1;\ dirlen = strlen(dir);\}\\syscall::open*:entry\/\arg1 & (O_WRONLY|O_RDWR) &&\ substr(copyinstr(arg0),0,dirlen)==dir\/\{\ printf("%s\n",copyinstr(arg0));\}\\syscall::mkdir*:entry\/\ substr(copyinstr(arg0),0,dirlen)==dir\/\{\ printf("%s\n",copyinstr(arg0));\}"

Definition at line 26 of file mon_dtracepipe.c.

◆ DTRACEPIPE_INIT_ERROR

#define DTRACEPIPE_INIT_ERROR
Value:
{\
free(ctx_p->fsmondata);\
ctx_p->fsmondata = NULL;\
return -1;\
}
ctx_t * ctx_p
Definition mon_kqueue.c:85
void * fsmondata
Definition ctx.h:419

Definition at line 54 of file mon_dtracepipe.c.

Function Documentation

◆ dtracepipe_add_watch_dir()

int dtracepipe_add_watch_dir ( struct ctx * ctx_p,
struct indexes * indexes_p,
const char *const accpath )

Definition at line 226 of file mon_dtracepipe.c.

Here is the caller graph for this function:

◆ dtracepipe_deinit()

int dtracepipe_deinit ( ctx_t * ctx_p)

Definition at line 230 of file mon_dtracepipe.c.

Here is the caller graph for this function:

◆ dtracepipe_handle()

int dtracepipe_handle ( struct ctx * ctx_p,
struct indexes * indexes_p )

Definition at line 222 of file mon_dtracepipe.c.

Here is the caller graph for this function:

◆ dtracepipe_init()

int dtracepipe_init ( ctx_t * ctx_p)

Definition at line 60 of file mon_dtracepipe.c.

◆ dtracepipe_wait()

int dtracepipe_wait ( struct ctx * ctx_p,
struct indexes * indexes_p,
struct timeval * timeout_p )

Definition at line 90 of file mon_dtracepipe.c.

Here is the caller graph for this function:

Variable Documentation

◆ dtracepipe_wait_line

char* dtracepipe_wait_line = NULL

Definition at line 88 of file mon_dtracepipe.c.

◆ dtracepipe_wait_line_siz

size_t dtracepipe_wait_line_siz

Definition at line 89 of file mon_dtracepipe.c.