diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-08-12 14:56:10 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-09-05 22:42:17 +0200 |
commit | 881e97ed00070a0e68382cf86a0e8ea87f6d3cb3 (patch) | |
tree | 07d8e1fef591694b4a4f7d625fd5346561cd11ec | |
parent | c55ece8d91d8fd3382e8b775897d21d25e4018b5 (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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |