summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 8ac4859..8145c9b 100644
--- a/utils.h
+++ b/utils.h
@@ -6,6 +6,15 @@
#define LOG(fmt, args ...) \
fprintf(stderr, ">>> UDTRACE: " fmt, ## args)
+typedef void (*udtrace_dissector)(int fd, bool is_out, const char *fn,
+ const uint8_t *data, unsigned int len);
+
+struct sock_state {
+ int fd;
+ const char *path;
+ udtrace_dissector dissector;
+};
+
/* find the state corresponding to a given file descriptor */
struct sock_state *udtrace_sstate_by_fd(int fd);
personal git repositories of Harald Welte. Your mileage may vary