02_Reverse-lookup-support.diff
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Fri, 30 Nov 2007 09:23:51 +0000 (10:23 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 30 Nov 2007 09:23:51 +0000 (10:23 +0100)
commit7f9340341574044e16e1ffc30f856f13d1e3ba6c
tree138e8432d55d0a9076a4faf5f6cea7fac97e8e57
parent84856762fd231cd3c3d48783e70182cfd6d9bb22
02_Reverse-lookup-support.diff

In some parts of the code a reverse-lookup (e.g. "connection from xxx") is used.
An address-family independent reverse-lookup function is provided by this patch,
exploiting that a socket is described by {src addr, src port, dst addr, dst port}:
 * host_and_port(): prints host and port number of given socket,
 * local_name():    pretty-prints src-addr/src-port,
 * remote_name():   pretty-prints dst-addr/dst-port;

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net.c
net.h