diff options
author | Thomas Markwalder <tmark@isc.org> | 2017-04-26 14:09:31 -0400 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2017-04-26 14:09:31 -0400 |
commit | 417b7b4a6dfd593a71851f4ff8807089d28d3820 (patch) | |
tree | 52eadc9d9c4c012b4db6ad50595172f7ecf6f5a6 /common | |
parent | 48ffe4b8d366792e6fbc0eaa7a8dc5be5c469213 (diff) | |
download | isc-dhcp-417b7b4a6dfd593a71851f4ff8807089d28d3820.tar.gz |
[master] Server now supports EUI-64 based address allocation scheme
Merged rt43927.
Diffstat (limited to 'common')
-rw-r--r-- | common/inet.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/common/inet.c b/common/inet.c index 2e3449cc..9b545b3a 100644 --- a/common/inet.c +++ b/common/inet.c @@ -4,7 +4,7 @@ way... */ /* - * Copyright (c) 2004-2016 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -646,3 +646,19 @@ validate_port_pair(char *port) { return htons((u_int16_t)local_port); } + +#ifdef DHCPv6 +/* Print a v6 address from an in6_addr struct */ +const char * +pin6_addr(const struct in6_addr *src){ + + if (!src) { + return ("<null>"); + } + + struct iaddr addr; + addr.len = 16; + memcpy(addr.iabuf, src->s6_addr, 16); + return (piaddr(addr)); +} +#endif |