Свойство | Type | Description | |
---|---|---|---|
AppNode | |||
Ethernet | |||
Info | |||
PublicInfo | |||
PublicNode |
Свойство | Type | Description | |
---|---|---|---|
_address_resolver | IAddressResolver | ||
_broadcast | bool | ||
_checked_out | |||
_conn_handler | ConnectionHandler | ||
_dhcp_client_port | int | ||
_dhcp_config | |||
_dhcp_server | Ipop.DhcpServer | ||
_dhcp_server_port | int | ||
_dns | Dns | ||
_ether_to_dhcp_server | DhcpServer>.Dictionary | ||
_ether_to_ip | MemBlock>.Dictionary | ||
_ip_to_ether | MemBlock>.Dictionary | ||
_ipop_config | |||
_last_check_node | System.DateTime | ||
_lock | int | ||
_multicast | bool | ||
_static_dhcp_server | Ipop.DhcpServer | ||
_static_mapping | SimpleTimer>.Dictionary | ||
_sync | object | ||
_translator | ITranslator |
Méthode | Description | |
---|---|---|
CalculateNetmaskCidr ( string netmask ) : int |
Converts from a.b.c.d to the number of 1s in a.b.c.d (CIDR notation).
|
|
HandleData ( MemBlock b, ISender ret, object state ) : void |
This method handles all incoming packets into the IpopNode, both abroad and local. This is done to reduce unnecessary extra classes and circular dependencies. This method probably shouldn't be called directly.
|
|
HandleIPIn ( MemBlock packet, ISender ret ) : void |
This method handles IPPackets that come from Brunet, i.e., abroad.
|
|
HandleRpc ( ISender caller, string method, IList args, object rs ) : void | ||
IpopNode ( |
Creates an IpopNode given a NodeConfig and an IpopConfig. Also sets up the Information, Ethernet device, and subscribes to Brunet for IP Packets
|
|
Run ( ) : void |
Starts the execution of the IpopNode, this passes the caller to execute the Brunet.Connect to eventually become Brunet.AnnounceThread.
|
Méthode | Description | |
---|---|---|
CheckInDhcpServer ( Ipop.DhcpServer dhcp_server ) : void |
The request on the IP allocation space (DHT) has returned. So we're done with the server.
|
|
CheckNode ( object o, |
||
CheckOutDhcpServer ( MemBlock ether_addr ) : Ipop.DhcpServer |
Static addresses are handled nearly identically to dynamic, so we use one shared method to pull a dhcp server from the list of dhcp servers. We only want one request per Ethernet / IP at a time.
|
|
GetDhcpConfig ( ) : void |
We need to get the DHCPConfig as soon as possible so that we can allocate static addresses, this method helps us do that.
|
|
GetDhcpServer ( ) : Ipop.DhcpServer |
Used to retrieve an instance of the DhcpServer associated with this type of node.
|
|
HandleArp ( MemBlock packet ) : void |
Parses Arp Packets and writes to the Ethernet the translation. IpopRouter makes nodes think they are in the same Layer 2 network so that two nodes in the same network can communicate directly with each other. IpopRouter masquerades for those that are not local. |
|
HandleBroadcast ( |
This method is called by HandleIPOut if the destination address is the broadcast address. If you want Broadcast, implement this method, output will most likely be sent via the SendIP() method in the IpopNode base class.
|
|
HandleDhcp ( |
This is used to process a dhcp packet on the node side, that includes placing data such as the local Brunet Address, Ipop Namespace, and other optional parameters in our request to the dhcp server. When receiving the results, if it is successful, the results are written to the TAP device.
|
|
HandleDns ( |
If a request is sent to address a.b.c.255 with the dns port (53), this method will be called by HandleIPOut. If you want Dns, implement this method, responses should be written directly to the tap interface using Ethernet.Send()
|
|
HandleIPOut ( |
This method handles IPPackets that come from the TAP Device, i.e., local system. Currently this supports HandleMulticast (ip[0] >= 244 && ip[0]<=239), HandleDns (dport = 53 and ip[3] == 1), dhcp (sport 68 and dport 67. |
|
HandleMulticast ( |
This method is called by HandleIPOut if the destination address is within the multicast address range. If you want Multicast, implement this method, output will most likely be sent via the SendIP() method in the IpopNode base class.
|
|
HandleNewStaticIP ( MemBlock ether_addr, MemBlock ip ) : void |
Let's see if we can route for an IP. Default is do nothing!
|
|
IsLocalIP ( MemBlock ip ) : bool |
Is this our IP? Are we routing for it?
|
|
MappingMissing ( MemBlock ip ) : bool | ||
MissedMapping ( string ip, Brunet.Address addr ) : void | ||
SendIP ( Brunet.Address target, MemBlock packet ) : void |
Sends the IP Packet to the specified target address.
|
|
SendIcmpRequest ( MemBlock dest_ip ) : void |
This sends an Icmp Request to the specified address, we want him to respond to us, so we can guarantee that by pretending to be the Server (i.e. x.y.z.1). We'll get a response in our main thread.
|
|
SetDns ( ) : void | ||
SetTAAuth ( ) : void | ||
SupportedDns ( string dns ) : bool | ||
UpdateMapping ( MemBlock ether_addr, MemBlock ip_addr ) : void |
Called when an ethernet address has had its IP address changed or set for the first time.
|
|
WriteIP ( ICopyable packet ) : void |
Writes an IPPacket as is to the TAP device.
|
public static CalculateNetmaskCidr ( string netmask ) : int | ||
netmask | string | |
Résultat | int |
protected CheckInDhcpServer ( Ipop.DhcpServer dhcp_server ) : void | ||
dhcp_server | Ipop.DhcpServer | |
Résultat | void |
protected CheckNode ( object o, |
||
o | object | |
ea | ||
Résultat | void |
protected CheckOutDhcpServer ( MemBlock ether_addr ) : Ipop.DhcpServer | ||
ether_addr | MemBlock | |
Résultat | Ipop.DhcpServer |
protected abstract GetDhcpServer ( ) : Ipop.DhcpServer | ||
Résultat | Ipop.DhcpServer |
protected HandleArp ( MemBlock packet ) : void | ||
packet | MemBlock | |
Résultat | void |
protected HandleBroadcast ( |
||
ipp | The IPPacket the contains the broadcast message | |
Résultat | bool |
public HandleData ( MemBlock b, ISender ret, object state ) : void | ||
b | MemBlock | The incoming packet |
ret | ISender | An ISender to return data from the original sender. |
state | object | always will be null |
Résultat | void |
protected HandleDhcp ( |
||
ipp | The IPPacket that contains the Dhcp Request | |
Résultat | bool |
protected HandleDns ( |
||
ipp | The IPPacket contain the Dns packet | |
Résultat | bool |
public HandleIPIn ( MemBlock packet, ISender ret ) : void | ||
packet | MemBlock | The packet from Brunet. |
ret | ISender | An ISender to send data to the Brunet node that sent /// the packet. |
Résultat | void |
protected HandleIPOut ( |
||
packet | The packet from the TAP device | |
ret | ISender | |
Résultat | void |
protected HandleMulticast ( |
||
ipp | The IPPacket the contains the multicast message | |
Résultat | bool |
protected HandleNewStaticIP ( MemBlock ether_addr, MemBlock ip ) : void | ||
ether_addr | MemBlock | |
ip | MemBlock | The IP in question. |
Résultat | void |
public HandleRpc ( ISender caller, string method, IList args, object rs ) : void | ||
caller | ISender | |
method | string | |
args | IList | |
rs | object | |
Résultat | void |
public IpopNode ( |
||
node_config | The path to a NodeConfig xml file | |
ipop_config | The path to a IpopConfig xml file | |
dhcp_config | ||
Résultat | Brunet |
protected IsLocalIP ( MemBlock ip ) : bool | ||
ip | MemBlock | The IP in question. |
Résultat | bool |
protected MappingMissing ( MemBlock ip ) : bool | ||
ip | MemBlock | |
Résultat | bool |
protected MissedMapping ( string ip, Brunet.Address addr ) : void | ||
ip | string | |
addr | Brunet.Address | |
Résultat | void |
protected SendIP ( Brunet.Address target, MemBlock packet ) : void | ||
target | Brunet.Address | the Brunet Address of the target |
packet | MemBlock | the data to send to the recepient |
Résultat | void |
protected SendIcmpRequest ( MemBlock dest_ip ) : void | ||
dest_ip | MemBlock | |
Résultat | void |
protected SupportedDns ( string dns ) : bool | ||
dns | string | |
Résultat | bool |
protected UpdateMapping ( MemBlock ether_addr, MemBlock ip_addr ) : void | ||
ether_addr | MemBlock | |
ip_addr | MemBlock | |
Résultat | void |
protected WriteIP ( ICopyable packet ) : void | ||
packet | ICopyable | The IPPacket! |
Résultat | void |
public ApplicationNode,Brunet.Applications AppNode | ||
Résultat |
public Information,Brunet.Applications Info | ||
Résultat |
public Information,Brunet.Applications PublicInfo | ||
Résultat |
public ApplicationNode,Brunet.Applications PublicNode | ||
Résultat |
protected IAddressResolver _address_resolver | ||
Résultat | IAddressResolver |
protected Hashtable,System.Collections _checked_out | ||
Résultat |
protected ConnectionHandler _conn_handler | ||
Résultat | ConnectionHandler |
protected Dictionary |
||
Résultat | DhcpServer>.Dictionary |
protected DateTime,System _last_check_node | ||
Résultat | System.DateTime |
protected DhcpServer,Ipop _static_dhcp_server | ||
Résultat | Ipop.DhcpServer |
protected Dictionary |
||
Résultat | SimpleTimer>.Dictionary |