Hi,

I've extracted two functions from Pidgin and its SIPE plugin. Both
functions are returning an IP address of an interface (if I understand
correctly).

I'm attaching C source and output from OpenBSD and Linux. On Linux this
function detects an IP address correctly, but on OpenBSD not.

Here is part (among others) which I don't understand. Declaration of
struc:

        struct ifreq *ifr;

and with printf I can see that:

        sizeof(*ifr) == sizeof(struct ifreq) /* 32 bytes */

and with my function print_buf I see that on Linux each interface starts
every 32 bytes in a buffer[1024], but on OpenBSD this isn't the case.

Could someone which knows the subject in question contact with me off
the list, how to fix this issue and shed some light so I could
understand that. Thanks in advance.


My other question is, you think that Pidgin should use getifaddrs() to
detect an IP address (please see attached source to avoid confusions)?

-- 
best regards
q#

Reply via email to