nis-util  1.0.D108
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
space_ethers_slurp Class Reference

#include <slurp.h>

Inheritance diagram for space_ethers_slurp:
space_ethers space

Public Types

typedef boost::shared_ptr
< space_ethers_slurp
pointer

Public Member Functions

virtual ~space_ethers_slurp ()
record::pointer query_by_name (const rcstring &name) const
record::pointer query_by_address (const rcstring &address) const
record::pointer query_by_ip_address (const rcstring &ip_address) const
void read_and_process (void)

Static Public Member Functions

static pointer create (const rcstring &filename, const space_hosts_slurp::pointer &hosts)

Protected Member Functions

 space_ethers_slurp (const rcstring &fn, const space_hosts_slurp::pointer &hosts)

Private Types

typedef std::map< rcstring,
record::pointer
by_name_t
typedef std::map< rcstring,
record::pointer
by_addr_t
typedef std::map< rcstring,
record::pointer
by_ip_addr_t

Private Member Functions

void process (const record::pointer &rp)
 space_ethers_slurp ()
 space_ethers_slurp (const space_ethers_slurp &rhs)
space_ethers_slurpoperator= (const space_ethers_slurp &rhs)

Private Attributes

space_hosts_slurp::pointer hosts
by_name_t by_name
by_addr_t by_addr
by_ip_addr_t by_ip_addr

Detailed Description

The space_ethers_slurp class is used to process the ethers file records, filing each away for later checks.

This checks the file for inter-row validity, and also validates the rows against the hosts file (loaded previosly).

Definition at line 34 of file slurp.h.


Member Typedef Documentation

Definition at line 121 of file slurp.h.

Definition at line 129 of file slurp.h.

Definition at line 113 of file slurp.h.

typedef boost::shared_ptr<space_ethers_slurp> space_ethers_slurp::pointer

Reimplemented from space_ethers.

Definition at line 38 of file slurp.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 27 of file slurp.cc.

space_ethers_slurp::space_ethers_slurp ( const rcstring fn,
const space_hosts_slurp::pointer hosts 
) [protected]

The constructor. For use by derived classes only.

Definition at line 32 of file slurp.cc.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

The create class method is used to create new dynamically allocated instances of this class.

Definition at line 43 of file slurp.cc.

space_ethers_slurp& space_ethers_slurp::operator= ( const space_ethers_slurp rhs) [private]

The assignment operator. Do not use.

void space_ethers_slurp::process ( const record::pointer rp) [private]

The process method use used to process each record, verifying against the group information and previous passwd records.

Definition at line 51 of file slurp.cc.

The query_by_address method is used to obtain a record, given the MAC address. Not valid until after read_and_process has been called.

Parameters:
addressThe address to search for.
Returns:
a pointer to the row, or a NULL pointer if not found.

Definition at line 310 of file slurp.cc.

The query_by_ip_address method is used to obtain a record, given the IP address. Not valid until after read_and_process has been called. Will not be fully populated if a NULL hosts pointer is given.

Parameters:
ip_addressThe address to search for.
Returns:
a pointer to the row, or a NULL pointer if not found.

The query_by_name method is used to obtain a record, given the host name. Not valid until after read_and_process has been called.

Parameters:
nameThe name to search for.
Returns:
a pointer to the row, or a NULL pointer if not found.

Definition at line 299 of file slurp.cc.

The read_and_process method is used to read the file and process all of the records.

Definition at line 285 of file slurp.cc.


Field Documentation

The by_addr instance variable is used to index ethers records by address.

Definition at line 127 of file slurp.h.

The by_ip_addr instance variable is used to index ethers records by IP address.

Definition at line 135 of file slurp.h.

The by_name instance variable is used to index ethers records by name.

Definition at line 119 of file slurp.h.

This is a pointer to the information about the hosts file, needed for various validations.

Definition at line 111 of file slurp.h.


The documentation for this class was generated from the following files: