Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 19 Sep 2012 10:59:45 -0700
From: Isaac Dunham <>
Subject: [RFC] get/freeifaddrs implementation ported from newlib

Here's a patch with getifaddrs & freeifaddrs.
I don't consider it ready to push yet, but would like comments/improvements.
The header is my own work, public domain; the C source is BSDi which is essentially the same as MIT.
I based it on the newlib 1.16.0 version, with the macros removed.
(newlib later removed getifaddrs either because it was not used or because it conditionally included a header with 4-clause BSD license; the code including that header has been removed).

Testing: I could only test on i386 with ipv4; there's a note suggesting that inet4 on LP64 (for us, x86_64) may be broken. ipv6 should also be tested.

The test is copy-pasted from getifaddrs(3).

Isaac Dunham <>

View attachment "ifaddr.diff" of type "text/x-diff" (5006 bytes)

View attachment "ifaddr-test.c" of type "text/x-csrc" (1584 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.