Services Map Type
This section describes the required prototype for a user-defined services map class.
The following is the required prototype for a user-defined services
map class:
void *sv_pvtinit();
void sv_close(void *private);
struct servent * sv_byname(void *private, const char *name, const char *proto);
struct servent * sv_byport(void *private, int port, const char *proto);
struct servent * sv_next(void *private);
void sv_rewind(void *private);
void sv_minimize(void *private);
Function sv_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 sv_pvtinit are optional for this class. The module can provide none or only part of the optional functions in its definition.