C# 클래스 Ipop.Managed.ManagedAddressResolverAndDns

This class implements Dns, IAddressResolver, IManagedHandler, and ITranslator. It provides most functionality needed by ManagedIpopNode.
상속: System.Net.Dns, IAddressResolver, ITranslator
파일 보기 프로젝트 열기: pstjuste/brunet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
mcast_addr List

보호된 프로퍼티들

프로퍼티 타입 설명
_addr_ip MemBlock>.Dictionary
_blocked_addrs MemBlock>.Dictionary
_dhcp DhcpServer
_dns_a string>.Dictionary
_dns_ptr string>.Dictionary
_ip_addr Address>.Dictionary
_local_ip MemBlock
_node StructuredNode
_resolver WriteOnce
_rx_counters int>.Dictionary
_sync object
_tx_counters int>.Dictionary
_udp_translators IProtocolTranslator[]

공개 메소드들

메소드 설명
AddDnsMapping ( string alias, string ip, bool reverse ) : void

Maps DNS alias to IP address.

AddIPMapping ( string ip, Brunet.Address addr ) : string

Maps IP address to Brunet address.

AddressLookUp ( String name ) : String

This method does an address lookup on the Dns

Check ( MemBlock ip, Brunet.Address addr ) : bool
GetStats ( string address ) : string
ManagedAddressResolverAndDns ( StructuredNode node, DhcpServer dhcp, MemBlock local_ip, string name_server, bool forward_queries ) : Brunet

Constructor for the class, it initializes various objects

MapLocalDns ( string name ) : bool

Sets up DNS for localhost

NameLookUp ( String ip ) : String

This method does an inverse lookup for the DNS

RemoveDnsMapping ( string alias, bool reverse ) : void

Remove Dns alias mapping.

RemoveIPMapping ( string ip ) : void

Remove IP to Brunet address mapping.

Resolve ( MemBlock IP ) : Brunet.Address

Returns the Brunet address given an IP

Translate ( MemBlock packet, Brunet.Address from ) : MemBlock

Implements the ITranslator portion for ManagedAddress..., takes an IP Packet, based upon who the originating Brunet Sender was, changes who the packet was sent from and then switches the destination address to the local nodes address. Takes incomming packets only.

보호된 메소드들

메소드 설명
UpdateCounter ( int>.Dictionary counters, Brunet.Address addr ) : void

메소드 상세

AddDnsMapping() 공개 메소드

Maps DNS alias to IP address.
public AddDnsMapping ( string alias, string ip, bool reverse ) : void
alias string Dns alias to map
ip string IP address to map
reverse bool If true, add reverve mapping
리턴 void

AddIPMapping() 공개 메소드

Maps IP address to Brunet address.
public AddIPMapping ( string ip, Brunet.Address addr ) : string
ip string IP address to map
addr Brunet.Address Brunet address to map
리턴 string

AddressLookUp() 공개 메소드

This method does an address lookup on the Dns
public AddressLookUp ( String name ) : String
name String Takes in name as string to lookup
리턴 String

Check() 공개 메소드

public Check ( MemBlock ip, Brunet.Address addr ) : bool
ip MemBlock
addr Brunet.Address
리턴 bool

GetStats() 공개 메소드

public GetStats ( string address ) : string
address string
리턴 string

ManagedAddressResolverAndDns() 공개 메소드

Constructor for the class, it initializes various objects
public ManagedAddressResolverAndDns ( StructuredNode node, DhcpServer dhcp, MemBlock local_ip, string name_server, bool forward_queries ) : Brunet
node StructuredNode Takes in a structured node
dhcp DhcpServer
local_ip MemBlock
name_server string
forward_queries bool
리턴 Brunet

MapLocalDns() 공개 메소드

Sets up DNS for localhost
public MapLocalDns ( string name ) : bool
name string The DNS alias for the localhost
리턴 bool

NameLookUp() 공개 메소드

This method does an inverse lookup for the DNS
public NameLookUp ( String ip ) : String
ip String IP address of the name that's being looked up
리턴 String

RemoveDnsMapping() 공개 메소드

Remove Dns alias mapping.
public RemoveDnsMapping ( string alias, bool reverse ) : void
alias string Dns alias to remove
reverse bool If true, remove reverse mapping
리턴 void

RemoveIPMapping() 공개 메소드

Remove IP to Brunet address mapping.
public RemoveIPMapping ( string ip ) : void
ip string IP address to remove
리턴 void

Resolve() 공개 메소드

Returns the Brunet address given an IP
public Resolve ( MemBlock IP ) : Brunet.Address
IP MemBlock A MemBlock of the IP
리턴 Brunet.Address

Translate() 공개 메소드

Implements the ITranslator portion for ManagedAddress..., takes an IP Packet, based upon who the originating Brunet Sender was, changes who the packet was sent from and then switches the destination address to the local nodes address. Takes incomming packets only.
public Translate ( MemBlock packet, Brunet.Address from ) : MemBlock
packet MemBlock The IP Packet to translate.
from Brunet.Address The Brunet address the packet was sent from.
리턴 MemBlock

UpdateCounter() 보호된 메소드

protected UpdateCounter ( int>.Dictionary counters, Brunet.Address addr ) : void
counters int>.Dictionary
addr Brunet.Address
리턴 void

프로퍼티 상세

_addr_ip 보호되어 있는 프로퍼티

Maps Brunet Address as Address to MemBlock IP Addresses
protected Dictionary _addr_ip
리턴 MemBlock>.Dictionary

_blocked_addrs 보호되어 있는 프로퍼티

Keeps track of blocked addresses
protected Dictionary _blocked_addrs
리턴 MemBlock>.Dictionary

_dhcp 보호되어 있는 프로퍼티

Helps assign remote end points
protected DhcpServer _dhcp
리턴 DhcpServer

_dns_a 보호되어 있는 프로퍼티

Contains ip:hostname mapping
protected Dictionary _dns_a
리턴 string>.Dictionary

_dns_ptr 보호되어 있는 프로퍼티

Contains hostname:ip mapping
protected Dictionary _dns_ptr
리턴 string>.Dictionary

_ip_addr 보호되어 있는 프로퍼티

Maps MemBlock IP Addresses to Brunet Address as Address
protected Dictionary _ip_addr
리턴 Address>.Dictionary

_local_ip 보호되어 있는 프로퍼티

MemBlock of the IP mapped to local node
protected MemBlock _local_ip
리턴 MemBlock

_node 보호되어 있는 프로퍼티

The node to do ping checks on
protected StructuredNode _node
리턴 StructuredNode

_resolver 보호되어 있는 프로퍼티

Create a new address resolver
protected WriteOnce _resolver
리턴 WriteOnce

_rx_counters 보호되어 있는 프로퍼티

Keeps track of number or received packets
protected Dictionary _rx_counters
리턴 int>.Dictionary

_sync 보호되어 있는 프로퍼티

Synchronization object
protected object _sync
리턴 object

_tx_counters 보호되어 있는 프로퍼티

Keeps track of number of sent packets
protected Dictionary _tx_counters
리턴 int>.Dictionary

_udp_translators 보호되어 있는 프로퍼티

protected IProtocolTranslator[] _udp_translators
리턴 IProtocolTranslator[]

mcast_addr 공개적으로 프로퍼티

Array list of multicast addresses
public List
mcast_addr
리턴 List