Protocols Map Type
This section describes the protocol map type.
The following is the required prototype for a user-defined protocols
map class:
void * pr_pvtinit();
void pr_close(void *private);
struct protoent * pr_byname(void *private, const char *name);
struct protoent * pr_bynumber(void *private, int num);
struct protoent * pr_next(void *private);
void pr_rewind(void *private);
void pr_minimize(void *private);
Function pr_pvtinit must exist. It is not required to return anything more than NULL. For example, the function can return NULL if the calling routine does not need private data.
Functions other than pr_pvtinit are optional for this class. The module can provide none or only part of the optional functions in its definition.