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/getnetbyname.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/getnetbyname.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/getnetbyname.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/getnetbyname.html on line 8
Get a network entry, given a name
#include <netdb.h>
struct netent * getnetbyname( const char * name );
- name
- The name of the network whose entry you want to find.
libsocket
Use the -l socket option to
qcc
to link against this library.
The getnetbyname() function gets the network entry for the
given name.
This function returns a pointer to a structure of type
netent, which contains the
broken-out fields of a line in the network database,
/etc/networks.
The
setnetent()
function opens and rewinds the file.
If you pass a nonzero stayopen argument to setnetent(),
the network database isn't closed after each call to
getnetbyname() or
getnetbyaddr().
The getnetbyaddr() and getnetbyname() functions
sequentially search from the beginning of the file
until a matching net name or net address and type is found,
or until EOF is encountered. Network numbers are supplied
in host order.
A pointer to a valid netent structure, or NULL
if an error occurs.
- /etc/networks
- Network name database file.
- /etc/nsswitch.conf
- Name-service switch configuration file.
POSIX 1003.1
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
endnetent(),
getnetbyaddr(),
getnetent(),
netent,
setnetent()
/etc/networks,
/etc/nsswitch.conf
in the Utilities Reference
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/getnetbyname.html on line 155
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/getnetbyname.html on line 155