US Robotics USR2410 Uživatelský manuál Strana 63

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 107
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 62
51
// handles IP packets with Grid data encapsulation
grid_data_demux :: IPClassifier(dst host me, // ip for us
dst net me/24, // ip for Grid network
- ); //other packets
// dev0
dev0 :: ToGridDev(ath0);
from_dev0 :: FromGridDev(ath0, me:eth)
from_dev0 [0] -> Paint(0) -> grid_demux
from_dev0 [1] -> Paint(0) -> probe_cl :: Classifier(12/7ffe, 12/7ffd);
probe_cl [0] -> ls -> probe_switch :: Switch(-1) -> dev0;
probe_cl [1] -> ls2 -> probe_switch;
// support for traceroute
dec_ip_ttl :: TTLChecker -> dev0;
dec_ip_ttl [1] -> ip_demux;
//tee the data, strip the grid header, print the packet
//if no print is required, use this line:
//grid_demux [0] -> CheckIPHeader( , 82)-> grid_data_demux;
grid_demux [0] -> CheckIPHeader( , 82)->print_tee :: Tee;
print_tee[0] -> grid_data_demux;
print_tee[1] -> Strip(82) -> IPPrint(grid_demux[0]->) -> Discard;
grid_demux [1] -> nb -> dev0;
ip_input :: CheckIPHeader -> GetIPAddress(16) -> ip_demux;
to_host :: ToHost(grid0);
to_host_encap :: EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) -> to_host;
from_host :: FromHost(grid0, me/24) -> arp_demux -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -
> to_host;
arp_demux [1] -> Strip(14) -> ip_input;
from_dev0 [2] -> ToHost(me);
ip_demux [0] -> to_host_encap; // loopback packet sent by us, required on BSD userlevel
ip_demux [1] -> GridEncap(me:eth, me:ip) -> dec_ip_ttl; // forward packet sent by us
grid_data_demux [0] -> Strip(82) -> to_host_encap; // receive packet from net for us
grid_data_demux [1] -> dec_ip_ttl; // forward packet from
net for someone else
grid_data_demux [2] -> to_gateway -> dec_ip_ttl; //forward packets destined for the
outside world to the gateway
Zobrazit stránku 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 106 107

Komentáře k této Příručce

Žádné komentáře