aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-08-12 14:56:10 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-12 15:21:43 +0200
commitabf33aaecfb18b806fd297cb42bffa7b620354fb (patch)
treecb575a74ee74ad8c80d3943c8bdc153a536ff745
parent215a5c8d011f2bc3bae3d597774d85a30d7f8f5d (diff)
lib/tun: Add 'void *priv' pointer to tun_t
This allows the application to attach some private state to the tun device, such as the context from which it was created/allocated Change-Id: Ief43b9b5fab5830fa8e28362c795f88f0b4d353b
-rw-r--r--lib/tun.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/tun.h b/lib/tun.h
index 8fa1c61..67ef39d 100644
--- a/lib/tun.h
+++ b/lib/tun.h
@@ -61,6 +61,8 @@ struct tun_t {
int routes; /* One if we allocated an automatic route */
char devname[IFNAMSIZ]; /* Name of the tun device */
int (*cb_ind) (struct tun_t * tun, void *pack, unsigned len);
+ /* to be used by libgtp callers/users (to attach their own private state) */
+ void *priv;
};
extern int tun_new(struct tun_t **tun);