210 const char * daemonName = NULL
257 #endif // P_CONFIG_FILE
347 #endif // PTLIB_IPACL_H
void SetDefaultAllowance(PBoolean defAllow)
Set the default state for allowed access if the list is empty.
Definition: ipacl.h:336
virtual void ReadFrom(istream &strm)
Input the contents of the object from the stream.
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
PBoolean IsAllowed() const
Get the allowed flag of entry.
Definition: ipacl.h:153
PBoolean allowed
Definition: ipacl.h:163
PIPSocket::Address address
Definition: ipacl.h:161
virtual Comparison Compare(const PObject &obj) const
Compare the two objects and return their relative rank.
PIPSocket::Address mask
Definition: ipacl.h:162
PBoolean IsAllowed(PTCPSocket &socket) const
Test the address/connection for if it is allowed within this access control list. ...
A class representing a configuration for the application.
Definition: config.h:62
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
PBoolean Parse(const PString &description)
Parse the description string into this IP access control specification.
PIpAccessControlEntry * Find(PIPSocket::Address address) const
Find the PIpAccessControl specification for the address.
PBoolean LoadHostsAccess(const char *daemonName=NULL)
Load the system wide files commonly use under Linux (hosts.allow and hosts.deny file) for IP access...
virtual void PrintOn(ostream &strm) const
Output the contents of the object to the stream.
virtual PIpAccessControlEntry * CreateControlEntry(const PString &description)
Create a new PIpAccessControl specification entry object.
const PIPSocket::Address & GetAddress() const
Get the address part of entry.
Definition: ipacl.h:145
PBoolean Remove(const PString &description)
Remove the specified entry into the list.
PBoolean Add(PIpAccessControlEntry *entry)
Add the specified entry into the list.
PIpAccessControlList(PBoolean defaultAllowance=true)
Create a new, empty, access control list.
void Save(PConfig &cfg)
Save entries in the list to the configuration file specified.
PBoolean IsHidden() const
Get the hidden flag of entry.
Definition: ipacl.h:157
bool PBoolean
Definition: object.h:174
PString AsString() const
Convert the specification to a string, that can be processed by the Parse() function.
The character string class.
Definition: pstring.h:108
A socket that uses the TCP transport on the Internet Protocol.
Definition: tcpsock.h:40
This class is a single IP access control specification.
Definition: ipacl.h:36
This class is a list of IP address mask specifications used to validate if an address may or may not ...
Definition: ipacl.h:183
PIpAccessControlEntry(PIPSocket::Address addr, PIPSocket::Address msk, PBoolean allow)
Create a new IP access control specification.
const PIPSocket::Address & GetMask() const
Get the mask part of entry.
Definition: ipacl.h:149
A class describing an IP address.
Definition: ipsock.h:59
PString domain
Definition: ipacl.h:160
PBoolean defaultAllowance
Definition: ipacl.h:343
PBoolean Match(PIPSocket::Address &address)
Check to see if the specified IP address match any of the conditions specifed in the Parse() function...
PBoolean IsValid()
Check the internal fields of the specification for validity.
const PString & GetDomain() const
Get the domain part of entry.
Definition: ipacl.h:141
#define PSORTED_LIST(cls, T)
Declare a sorted list class.
Definition: lists.h:1116
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
PBoolean Load(PConfig &cfg)
Load entries in the list from the configuration file specified.
PIpAccessControlEntry & operator=(const PString &pstr)
Set a new IP access control specification.
PBoolean GetDefaultAllowance() const
Get the default state for allowed access if the list is empty.
Definition: ipacl.h:332
PBoolean hidden
Definition: ipacl.h:164