To fix your application, call either
Âstruct ifconf ifc;
Âifc.ifc_len = sizeof (struct ifreq) * 32;
Âifc.ifc_buf = malloc (ifc.ifc_len);
Âif (ioctl (fd, SIOCGIFCONF, &ifc))
 Â/* Resize ifc_buf and retry */
Âelse
 Â{
  Âstruct ifreq *ifr = ifc.ifc_req;
  Âstruct ifreq ifr2;
  Âfor (int i = 0; i < ifc.ifc_len; i += sizeof (struct ifreq), ++ifr)
   Âif (!ioctl (fd, SIOCGIFADDR, &ifr2))
    Â/* Print result for that interface */
 Â}
Thanks, this works half! No need of ifr2, ifr is enough.
I saw the name change: 1.5 gives eth0, eth1, eth2, lo and 1.7 gives
{821C54BE-...}...