0

I'm wondering if there is a location in the Windows Registry that will contain the APIPA (link-local) IP address once provided to the interface. I've even searched for 169.254.x.x in the Registry but to no avail.

I know that you can add the DWORD 'IPAutoconfigurationEnabled' to enable/disable APIPA here: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

I'm wondering if there is another subkey that can be added that the Windows OS will populate with the link-local address (169.254.x.x)? Or is there another method to come up with what the IP address will be using the MAC Address?

I'm aware of using ipconfig and netsh, I was hoping to obtain this IP from the registry and not perform a system call from a C program.

wazilian
  • 25
  • 4

1 Answers1

1

Link local address prefix are RFC specification for auto address assignment. Windows TCP/IP stores these address as volatile & doesn't in registry as these address changes with boot or after adapter is disabled. Windows TCP/IP stack stores the address in registry only for static address assignment. So you need to use iphlpapi to get these volatile addresses.

dvasanth
  • 1,337
  • 1
  • 9
  • 10
  • Yeah, this makes sense when you mentioned the link local address is in volatile memory. I'm using the registry to get the interface name (that long signature string) and ifaddrs to get the link local address. Thanks! – wazilian Aug 16 '14 at 16:36