PPL6-Icon Patrick's Programming Library Version 6.4.21 - Dokumentation
ppl6::CHostsAllow Klassenreferenz

Klasse zum Prüfen, ob eine IP-Adresse in einer Liste enthalten ist. Mehr ...

Öffentliche Methoden

 CHostsAllow ()
 
 ~CHostsAllow ()
 
void Clear ()
 
int Count ()
 
void Enable (bool flag=true)
 
int IsAllowed (const char *ip)
 
int IsEnabled ()
 
int Load (const char *text)
 
int LoadFromFile (const char *filename,...)
 
int LoadFromFile (const CString &filename)
 
int LoadFromFile (CFileObject &file)
 
int Num ()
 
void SetLogfile (CLog *log=NULL)
 Aktivierung der Debug-Funktionen. Mehr ...
 

Private Attribute

bool enabled
 
CAssocArray Hosts
 
CLogLog
 
CMutex Mutex
 

Ausführliche Beschreibung

Beschreibung:
Diese Klasse kann verwendet werden, um zu überprüfen, ob eine IP-Adresse in einer Liste enthalten ist. Dazu wird zunächst eine sogenannte "hostsallow"-Liste geladen. Die Liste kann sowohl einzelne IP-Adressen, IP-Adressen mit Netzmasken als auch Hostnamen enthalten.
Beispiel:
# Spezifische IPs
127.0.0.1
# Subnetze können angegeben werden
62.40.10.192/29
# Oder Hostnamen. Dabei erfolgt jedoch bei jedem Connect eine Hostauflösung
server.pfp.de
thunder.pfp.de
Seit
Diese Klasse wurde mit Version 6.0.23 eingeführt

Beschreibung der Konstruktoren und Destruktoren

ppl6::CHostsAllow::CHostsAllow ( )
ppl6::CHostsAllow::~CHostsAllow ( )

Dokumentation der Elementfunktionen

void ppl6::CHostsAllow::Clear ( )
int ppl6::CHostsAllow::Count ( )
void ppl6::CHostsAllow::Enable ( bool  flag = true)
int ppl6::CHostsAllow::IsAllowed ( const char *  ip)
int ppl6::CHostsAllow::IsEnabled ( )
int ppl6::CHostsAllow::Load ( const char *  text)
int ppl6::CHostsAllow::LoadFromFile ( const char *  filename,
  ... 
)
int ppl6::CHostsAllow::LoadFromFile ( const CString filename)
int ppl6::CHostsAllow::LoadFromFile ( CFileObject file)
int ppl6::CHostsAllow::Num ( )
void ppl6::CHostsAllow::SetLogfile ( CLog log = NULL)

Dokumentation der Datenelemente

bool ppl6::CHostsAllow::enabled
private
CAssocArray ppl6::CHostsAllow::Hosts
private
CLog* ppl6::CHostsAllow::Log
private
CMutex ppl6::CHostsAllow::Mutex
private

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: