> > Still too much code duplication (and it reeks of the SMALLBUF, BIGBUF
> > things found in too many apps).
>
> No, just one type, "netaddrstring_t" or something like that, for
> exactly this purpose.
You mean, define that to a suitable array? Like
__u32 x;
addrstr_ipv4_t adr;
addrstr_ipv4_ntoa(&adr, x);
printk("%s", adr);
(note the "ipv4" as name component; we're going to need an ipv6 one too)
That would probably be OK, although I don't think we _need_ the
explicit buffers.
> > This is _perfect_ stuff for writing a suitable library function.
>
> What is a suitable library function in this case, IYO?
printk(). Need to find a suitable syntax for different address
families though.
Olaf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:11 EST