This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New getaddinfo implementation

Hash: SHA1

Thorsten Kukuk wrote:

> I wrote a new getaddrinfo implementation for Linux,

Reading this I got really exciting...

> which uses the netlink kernel interface and works with IPv6, too.

... but this sounded strange :-).  You mean getifaddrs...

How does this implementation react if netlink is not available?  Netlink
is optional, right?  If yes, we probably need a fallback solution.

What worries me most is the memory handling.  First, there are several
places where the malloc/calloc results are not checked for NULL.  This
will require cleanups.  Also, the number of separate memory operations
is high.  It should be possible to use exactly one chunk of memory.
Memory allocation is relatively slow and many allocations might lead to
fragmentation.  If possible, for instance for the temporary objects used
in the functions, alloca should be used.  This might mean merging a
functions or two but that's OK.

A few more comments for the non-obvious things, like the netlink
protocol, would be nice to have, too.  And the code does not really
follow the coding conventions.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at `---------------------------
Version: GnuPG v1.2.1 (GNU/Linux)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]