On 19/02/2019 17:36, Dan Ritter wrote: > tony wrote: >> On 19/02/2019 16:10, Greg Wooledge wrote: >>> On Fri, Feb 15, 2019 at 11:11:29AM +0100, tony wrote: >>>> Debian 9. I need to read my IPv6 address into a python script. >>> >>> Why? >>> >>> <https://mywiki.wooledge.org/IpAddress> may offer some insight.
> That sounds like a job for a dynamic dns client. > > existing Debian packages: > > ddclient (multiple backend services supported) > ddupdate (also supports multiple services, more plugin-oriented) > dyfi (Finnish users only) > dyndns (multiple services) > ez-ipupdate (multiple services) > ipcheck (dyndns protocol specific, but many services use it) > isc-dhcp-client-ddns (adds dynamic dns to DHCP) > > Don't reinvent the wheel, when it looks like it already has > seven versions already. > Right, I've had a (brief) look at some of those, and it seems to me that none offer a better solution than what I've already got. This thread has now drifted from my asking whether there was any way of interrogating the hardware to obtain the current IP6 address of host - apparently not - via an outburst of pedantry, to recommendations on some off the shelf libraries to update a DNS. I have no problem; I was simply investigating alternatives to obtaining the current IP6 address, and thanks to an early reply came up with netifaces, which does a fine job. As I previously mentioned, I have a well-tried program for keeping my DNS updated - albeit for IP4 only, and all I want is to extend that for IP6. Re-inventing the wheel? No, just a natural evolution. I'd be re-inventing the wheel if I scrapped what I've got, simply to use a general-purpose library. If I were starting from scratch, I may well consider a ready-made client. One drawback that is immediately apparent, and may well be a misunderstanding on my part, is that any of the clients mentioned require to be configured with a particular (proprietary) protocol, to communicate with a (proprietary) dynamic DNS server (DynDNS seems to be the favourite). Nowhere have I seen NSUpdate mentioned. Maybe there's a reason for that, but I'm quite happy with NSUpdate. So, whilst I appreciate all your attempts to help, I think I'll stick with what I've got. Thanks all. Cheers, Tony