Opens the /etc/protocols file and sets the file marker.
Standard C Library (libc.a)
#include <netdb.h> void setprotoent (StayOpen) int StayOpen;
Attention: Do not use the setprotoent subroutine in a multithreaded environment.
The setprotoent subroutine opens the /etc/protocols file and sets the file marker to the beginning of the file.
|StayOpen||Indicates when to close the /etc/protocols file.|
The return value points to static data that is overwritten by subsequent calls.
The setprotoent subroutine is part of Base Operating System (BOS) Runtime.
All applications containing the setprotoent subroutine must be compiled with _BSD set to a specific value. Acceptable values are 43 and 44. In addition, all socket applications must include the BSD libbsd.a library.
|/etc/protocols||Contains the protocol names.|
The endprotoent subroutine, getprotobyname subroutine, getprotobynumber subroutine, getprotoent subroutine.
Sockets Overview and Understanding Network Address Translation in AIX Version 4.3 Communications Programming Concepts.