Chapter Contents

Previous

Next
setprotoent

setprotoent



Opens the Protocols File

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
PORTABILITY
IMPLEMENTATION
RELATED FUNCTIONS


SYNOPSIS

#include <netdb.h>

void setprotoent(int stayopen);


DESCRIPTION

setprotoent opens the protocols file, that is, a file with the same format as /etc/protocols in the UNIX environment. If the file is already open, setprotoent rewinds the file so that succeeding getprotoent calls can read it sequentially. Specifying a nonzero value for stayopen causes the protocols file to remain open between subsequent getprotobyname and getprotobynumber calls. Refer to Network Administration for information on naming the protocols file for your system.


RETURN VALUE

setprotoent does not return a value.


PORTABILITY

setprotoent is portable to other environments, including most UNIX systems, that implement BSD sockets.


IMPLEMENTATION

This routine is ported directly from the BSD UNIX Socket Library.


RELATED FUNCTIONS

endprotoent , getprotobyname , getprotobynumber , getprotoent


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.