56
from_host :: FromHost(grid0, me/24) ->arp_demux ->ARPResponder(0.0.0.0/0 1:1:1:1:1:1)-
>to_host;
//from_host for the non-grid device
from_host_noGrid :: FromHost(intern0, intern/24) ->arp_demux;
//non-grid device
intern_dev :: GatewayDevice(eth0);
// ARP MACHINERY for non-grid device
intern_arp_class :: Classifier(12/0806 20/0001, 12/0806 20/0002, 12/0800, -);
intern_arpq :: ARPQuerier(intern);
intern_dev -> intern_arp_class;
intern_arp_class[0] -> ARPResponder(intern) //respond to ARP queries
-> intern_dev;
intern_arp_class[1] -> [1]intern_arpq;
//packets from output 2 are data packets (non-ARP). They are dealt with below.
intern_arp_class[3] -> Discard; //discard unrecognized packets
// REWRITERS for NAT
IPRewriterPatterns(to_world_pat me 50000-65535 - -,
to_server_pat intern 50000-65535 - -);
rewriter :: IPRewriter(// internal traffic to outside world
pattern to_world_pat 0 1,
// external traffic from mesh grid
pattern to_server_pat 1 0,
//pass through packets from client
//to check for previous routes
pass 2,
//pass through packets from mesh grid
//to check for previous routes
pass 3
);
// Rewriting rules for ICMP packets
irw :: ICMPPingRewriter(me, -);
// Rewriting rules for ICMP error packets
ierw :: ICMPRewriter(rewriter irw);
//output path for packets destined for the internal network
Comentarios a estos manuales