Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 8

getifaddrs()

Get a network interface address

Synopsis:

#include <sys/types.h>
#include <sys/socket.h>
#include <ifaddrs.h>

int getifaddrs( struct ifaddrs ** ifap );

Arguments:

ifap
The address of a location where the function can store a pointer to a linked list of ifaddrs structures that contain the data related to the network interfaces on the local machine.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

The getifaddrs() function stores a reference to a linked list of the network interfaces on the local machine in the memory referenced by ifap.

The data returned by getifaddrs() is dynamically allocated; you should free it by calling freeifaddrs() when you no longer need it.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

The getifaddrs() function may fail and set errno for any of the errors specified by:

Classification:

Unix

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

errno, freeifaddrs(), ifaddrs, ioctl(), malloc(), socket(), sysctl()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 146

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getifaddrs.html on line 146