getnetent_r(3) Library Functions Manual getnetent_r(3) getnetent_r, getnetbyname_r, getnetbyaddr_r - ( ) Standard C library (libc, -lc) #include int getnetent_r(struct netent *restrict result_buf, char buf[restrict .size], size_t size, struct netent **restrict result, int *restrict h_errnop); int getnetbyname_r(const char *restrict name, struct netent *restrict result_buf, char buf[restrict .size], size_t size, struct netent **restrict result, int *restrict h_errnop); int getnetbyaddr_r(uint32_t net, int type, struct netent *restrict result_buf, char buf[restrict .size], size_t size, struct netent **restrict result, int *restrict h_errnop); glibc (. feature_test_macros(7)): getnetent_r(), getnetbyname_r(), getnetbyaddr_r(): glibc 2.19: _DEFAULT_SOURCE glibc 2.19 : _BSD_SOURCE || _SVID_SOURCE getnetent_r(), getnetbyname_r() getnetbyaddr_r() getnetent(3), getnetbyname(3) getnetbynumber(3), . netent . . netent , result_buf. The buf array is used to store the string fields pointed to by the returned netent structure. (The nonreentrant functions allocate these strings in static storage.) The size of this array is specified in size. If buf is too small, the call fails with the error ERANGE, and the caller must try again with a larger buffer. (A buffer of size 1024 bytes should be sufficient for most applications.) , *result result_buf; *result NULL. , h_errnop, , h_errno . 0. , . , (getnetbyname_r(), getnetbyaddr_r()) (getnetent_r()) result NULL. ENOENT (getnetent_r()) . ERANGE buf is too small. Try again with a larger buffer (and increased size). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getnetent_r(), | | MT-Safe locale | |getnetbyname_r(), | | | |getnetbyaddr_r() | | | +----------------------------+----------------------------------------------------------+--------------------------+ , . GNU. getnetent(3), networks(5) () Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux man-pages 6.12 24 2024 . getnetent_r(3)