From 4bbecf70cc3ad33da75f0dd01d6b683f271f9bd0 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 16 Oct 2017 15:51:28 +0300 Subject: move build_ip6_addr function to ipdb.c --- accel-pppd/cli/show_sessions.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'accel-pppd/cli') diff --git a/accel-pppd/cli/show_sessions.c b/accel-pppd/cli/show_sessions.c index eabf95b..47adb3a 100644 --- a/accel-pppd/cli/show_sessions.c +++ b/accel-pppd/cli/show_sessions.c @@ -408,16 +408,6 @@ static void print_ip6_dp(struct ap_session *ses, char *buf) sprintf(ptr, "/%i", a->prefix_len); } -static void build_ip6_addr(struct ipv6db_addr_t *a, uint64_t intf_id, struct in6_addr *addr) -{ - memcpy(addr, &a->addr, sizeof(*addr)); - - if (a->prefix_len <= 64) - *(uint64_t *)(addr->s6_addr + 8) = intf_id; - else - *(uint64_t *)(addr->s6_addr + 8) |= intf_id & ((1 << (128 - a->prefix_len)) - 1); -} - static void print_ip6(struct ap_session *ses, char *buf) { struct ipv6db_addr_t *a; -- cgit v1.2.3