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
Review at https://gerrit.osmocom.org/7927
lib/tun: Remove tun_setaddr() API, as everyone is using tun_addaddr() now
Change-Id: I02e057d30b6773c17ea6bc31094e53587971e9e7
---
M lib/tun.c
M lib/tun.h
2 files changed, 0 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/27/7927/1
diff --git a/lib/tun.c b/lib/tun.c
index a7f5512..dcc026c 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -95,20 +95,6 @@
return rc;
}
-int tun_setaddr(struct tun_t *this, struct in46_addr *addr, struct in46_addr *dstaddr, size_t prefixlen)
-{
- struct in_addr netmask;
- switch (addr->len) {
- case 4:
- netmask.s_addr = htonl(0xffffffff << (32 - prefixlen));
- return tun_setaddr4(this, &addr->v4, dstaddr ? &dstaddr->v4 : NULL, &netmask);
- case 16:
- return tun_setaddr6(this, &addr->v6, dstaddr ? &dstaddr->v6 : NULL, prefixlen);
- default:
- return -1;
- }
-}
-
static int tun_addaddr4(struct tun_t *this, struct in_addr *addr,
struct in_addr *dstaddr, struct in_addr *netmask)
{
diff --git a/lib/tun.h b/lib/tun.h
index c9e8e34..e41ee69 100644
--- a/lib/tun.h
+++ b/lib/tun.h
@@ -49,9 +49,6 @@
extern int tun_addaddr(struct tun_t *this, struct in46_addr *addr,
struct in46_addr *dstaddr, size_t prefixlen);
-extern int tun_setaddr(struct tun_t *this, struct in46_addr *our_adr,
- struct in46_addr *his_adr, size_t prefixlen);
-
extern int tun_set_cb_ind(struct tun_t *this,
int (*cb_ind) (struct tun_t * tun, void *pack,
unsigned len));
--
To view, visit https://gerrit.osmocom.org/7927
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I02e057d30b6773c17ea6bc31094e53587971e9e7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>