[avahi] IP address

Lennart Poettering lennart at poettering.net
Thu May 4 14:21:19 PDT 2006

On Tue, 02.05.06 19:48, anton feldmann (anton.feldmann at uni-bielefeld.de) wrote:

> Hi
> How do i get the IP address of computer? i could figure out how i can 
> get the name, but i really want to use the IP address.
> How do i make my daemon public in the network?


These questions seem a little off-topic to me. 

Anyway: a machine usually has more than one IP address assigned. The
easiest way to query the list of local addresses on BSD/Linux is by
using the SIOCGIFCONF ioctl call on a socket fd. See netdevice(7) for
more information. This will return only IPv4 addresses, though.

I don't understand your second question.


Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/

More information about the avahi mailing list