Anope IRC Services  Version 2.0
Data Structures | Public Member Functions | Private Attributes
cidr Class Reference

#include <sockets.h>

Collaboration diagram for cidr:
Collaboration graph
[legend]

Data Structures

struct  hash
 

Public Member Functions

 cidr (const Anope::string &ip)
 
 cidr (const Anope::string &ip, unsigned char len)
 
 cidr (const sockaddrs &ip, unsigned char len)
 
Anope::string mask () const
 
bool match (const sockaddrs &other)
 
bool valid () const
 
bool operator< (const cidr &other) const
 
bool operator== (const cidr &other) const
 
bool operator!= (const cidr &other) const
 

Private Attributes

sockaddrs addr
 
Anope::string cidr_ip
 
unsigned short cidr_len
 

Detailed Description

Definition at line 87 of file sockets.h.

Constructor & Destructor Documentation

cidr::cidr ( const Anope::string ip)
cidr::cidr ( const Anope::string ip,
unsigned char  len 
)
cidr::cidr ( const sockaddrs ip,
unsigned char  len 
)

Definition at line 219 of file sockets.cpp.

References sockaddrs::addr(), cidr_ip, and cidr_len.

Member Function Documentation

Anope::string cidr::mask ( ) const
bool cidr::match ( const sockaddrs other)
bool cidr::operator!= ( const cidr other) const

Definition at line 312 of file sockets.cpp.

bool cidr::operator< ( const cidr other) const

Definition at line 277 of file sockets.cpp.

References addr, cidr_len, sockaddrs::sa, sockaddrs::sa4, and sockaddrs::sa6.

bool cidr::operator== ( const cidr other) const

Definition at line 307 of file sockets.cpp.

bool cidr::valid ( ) const

Definition at line 317 of file sockets.cpp.

References addr, and sockaddrs::valid().

Referenced by XLine::Init(), and match().

Field Documentation

sockaddrs cidr::addr
private

Definition at line 89 of file sockets.h.

Referenced by cidr(), mask(), match(), cidr::hash::operator()(), operator<(), and valid().

Anope::string cidr::cidr_ip
private

Definition at line 90 of file sockets.h.

Referenced by cidr(), and mask().

unsigned short cidr::cidr_len
private

Definition at line 91 of file sockets.h.

Referenced by cidr(), mask(), match(), cidr::hash::operator()(), and operator<().


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