C# Class Brunet.Transport.NetmaskTAAuthorizer

Inheritance: TAAuthorizer
Show file Open project: johnynek/brunet Class Usage Examples

Protected Properties

Property Type Description
_bit_c int
_nw_bytes byte[]
_result_on_match TAAuthorizer.Decision
_result_on_mismatch TAAuthorizer.Decision

Public Methods

Method Description
Authorize ( TransportAddress a ) : TAAuthorizer.Decision
NetmaskTAAuthorizer ( IPAddress nw, int bit_c, TAAuthorizer on_match, TAAuthorizer on_mismatch ) : System

Protected Methods

Method Description
FirstBitsMatch ( byte a, byte b, int count ) : bool

Method Details

Authorize() public method

public Authorize ( TransportAddress a ) : TAAuthorizer.Decision
a TransportAddress
return TAAuthorizer.Decision

FirstBitsMatch() protected method

protected FirstBitsMatch ( byte a, byte b, int count ) : bool
a byte
b byte
count int
return bool

NetmaskTAAuthorizer() public method

public NetmaskTAAuthorizer ( IPAddress nw, int bit_c, TAAuthorizer on_match, TAAuthorizer on_mismatch ) : System
nw System.Net.IPAddress
bit_c int
on_match TAAuthorizer
on_mismatch TAAuthorizer
return System

Property Details

_bit_c protected property

protected int _bit_c
return int

_nw_bytes protected property

protected byte[] _nw_bytes
return byte[]

_result_on_match protected property

protected TAAuthorizer.Decision _result_on_match
return TAAuthorizer.Decision

_result_on_mismatch protected property

protected TAAuthorizer.Decision _result_on_mismatch
return TAAuthorizer.Decision