Opens the /etc/protocols file and sets the file marker.
Standard C Library (libc.a)
The setprotoent subroutine is threadsafe in AIX 4.3 and later. However, the return value points to static data that is overwritten by subsequent calls. This data must be copied to be saved for use by subsequent calls.
The setprotoent subroutine opens the /etc/protocols file and sets the file marker to the beginning of the file.
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.
The return value points to static data that is overwritten by subsequent calls.
/etc/protocols | Contains the protocol names. |
The endprotoent subroutine, getprotobyname subroutine, getprotobynumber subroutine, getprotoent subroutine.
Sockets Overview and Understanding Network Address Translation in AIX 5L Version 5.2 Communications Programming Concepts.