[PATCH] openggsn[master]: lib/tun: Add 'void *priv' pointer to tun_t

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 5 20:26:47 UTC 2017


Review at  https://gerrit.osmocom.org/3837

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
---
M lib/tun.h
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/37/3837/1

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 @@
 	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);

-- 
To view, visit https://gerrit.osmocom.org/3837
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief43b9b5fab5830fa8e28362c795f88f0b4d353b
Gerrit-PatchSet: 1
Gerrit-Project: openggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list