PIpAccessControlEntry Class Reference
#include <ipacl.h>
List of all members.
Detailed Description
This class is a single IP access control specification.
Constructor & Destructor Documentation
Create a new IP access control specification. See the Parse() function for more details on the format of the description
parameter.
PIpAccessControlEntry::PIpAccessControlEntry |
( |
const PString & |
description |
) |
|
Member Function Documentation
PString PIpAccessControlEntry::AsString |
( |
|
) |
const |
Convert the specification to a string, that can be processed by the Parse() function.
- Returns:
- PString representation of the entry.
virtual Comparison PIpAccessControlEntry::Compare |
( |
const PObject & |
obj |
) |
const [virtual] |
Compare the two objects and return their relative rank.
- Returns:
LessThan
, EqualTo
or GreaterThan
according to the relative rank of the objects.
- Parameters:
-
| obj | Object to compare against. |
Get the address part of entry.
const PString& PIpAccessControlEntry::GetDomain |
( |
|
) |
const [inline] |
Get the domain part of entry.
References domain.
Get the mask part of entry.
References mask.
BOOL PIpAccessControlEntry::IsAllowed |
( |
|
) |
const [inline] |
Get the allowed flag of entry.
References allowed.
BOOL PIpAccessControlEntry::IsHidden |
( |
|
) |
const [inline] |
Get the hidden flag of entry.
References hidden.
BOOL PIpAccessControlEntry::IsValid |
( |
|
) |
|
Check the internal fields of the specification for validity.
- Returns:
- TRUE if entry is valid.
Check to see if the specified IP address match any of the conditions specifed in the Parse() function for this entry.
- Returns:
- TRUE if entry can match the address.
- Parameters:
-
| address | Address to search for |
Set a new IP access control specification. See the Parse() function for more details on the format of the pstr
and cstr
parameters.
BOOL PIpAccessControlEntry::Parse |
( |
const PString & |
description |
) |
|
Parse the description string into this IP access control specification. The string may be of several forms: n.n.n.n Simple IP number, this has an implicit mask of 255.255.255.255 n.n. IP with trailing dot, assumes a mask equal to the number of specified octets eg 10.1. is equivalent to 10.1.0.0/255.255.0.0 n.n.n.n/b An IP network using b bits of mask, for example 10.1.0.0/14 is equivalent to 10.0.1.0/255.248.0.0 n.n.n.n/m.m.m.m An IP network using the specified mask hostname A specific host name, this has an implicit mask of 255.255.255.255 .domain.dom Matches an IP number whose cannonical name (found using a reverse DNS lookup) ends with the specified domain.
- Returns:
- TRUE if entry is valid.
- Parameters:
-
| description | Description of the specification |
virtual void PIpAccessControlEntry::PrintOn |
( |
ostream & |
strm |
) |
const [virtual] |
Output the contents of the object to the stream. This outputs the same format as the AsString() function.
- Parameters:
-
| strm | Stream to print the object into. |
Reimplemented from PObject.
virtual void PIpAccessControlEntry::ReadFrom |
( |
istream & |
strm |
) |
[virtual] |
Input the contents of the object from the stream. This expects the next space delimited entry in the stream to be as described in the Parse() function.
- Parameters:
-
| strm | Stream to read the objects contents from. |
Reimplemented from PObject.
Member Data Documentation
The documentation for this class was generated from the following file: