nis-util  1.0.D108
Functions
nis-util-services/map.h File Reference
#include <lib/rcstring.h>

Go to the source code of this file.

Functions

void map_by_name (const rcstring &etc_services, const rcstring &output)
void map_by_servicename (const rcstring &etc_services, const rcstring &output)

Function Documentation

void map_by_name ( const rcstring etc_services,
const rcstring output 
)

The by_name function is used to read a services map (like the /etc/services file) and produce a map indexed by port number.

Parameters:
etc_servicesthe map source file to be read
outputwhere to write the output.
Note:
Despite the name, the -byname option actually means to generate a map indexed by port number. The orignal YP authors came up with this brilliant piece of cognitive dissonance, and we are stuck with it.

The map_by_name function is used to convert the ethers file into a form suitable for passing to makedbm to build a NIS map.

Definition at line 31 of file map.cc.

void map_by_servicename ( const rcstring etc_services,
const rcstring output 
)

The by_servicename function is used to read a services map (like the /etc/services file) and produce a map indexed by service name and service aliases.

Parameters:
etc_servicesthe map source file to be read
outputwhere to write the output.
Note:
Despite the name, the -byservicename options means to generate a map indexed by service name and service aliases. The orignal YP authors came up with this brilliant piece of cognitive dissonance, and we are stuck with it.

Definition at line 49 of file map.cc.