getprotoent(3) Library Functions Manual getprotoent(3) getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent - LIBRARY Standard C library (libc, -lc) #include struct protoent *getprotoent(void); struct protoent *getprotobyname(const char *name); struct protoent *getprotobynumber(int proto); void setprotoent(int stayopen); void endprotoent(void); getprotoent() , ( protocols(5)), protoent, . . getprotobyname() protoent , name. . getprotobynumber() protoent , number. . setprotoent() . stayopen , getproto*() . endprotoent() . protoent : struct protoent { char *p_name; /* */ char **p_aliases; /* */ int p_proto; /* */ } protoent: p_name . p_aliases , NULL. p_proto . The getprotoent(), getprotobyname(), and getprotobynumber() functions return a pointer to a statically allocated protoent structure, or a null pointer if an error occurs or the end of the file is reached. /etc/protocols , attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getprotoent() | | MT-Unsafe race:protoent | | | | race:protoentbuf locale | +----------------------------+----------------------------------------------------------+--------------------------+ |getprotobyname() | | MT-Unsafe | | | | race:protobyname locale | +----------------------------+----------------------------------------------------------+--------------------------+ |getprotobynumber() | | MT-Unsafe | | | | race:protobynumber | | | | locale | +----------------------------+----------------------------------------------------------+--------------------------+ |setprotoent(), | | MT-Unsafe race:protoent | |endprotoent() | | locale | +----------------------------+----------------------------------------------------------+--------------------------+ protoent race:protoent , setprotoent(), getprotoent() endprotoent(), . POSIX.1-2008. POSIX.1-2001, 4.3BSD. . getnetent(3), getprotoent_r(3), getservent(3), protocols(5) Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . getprotoent(3)