From 566d17f731637df6828bdf32502a0fb123882dbe Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 9 Oct 2003 11:41:45 +0000 Subject: Initial import --- src/org/noreply/fancydress/type3/Path.java | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/org/noreply/fancydress/type3/Path.java (limited to 'src/org/noreply/fancydress/type3/Path.java') diff --git a/src/org/noreply/fancydress/type3/Path.java b/src/org/noreply/fancydress/type3/Path.java new file mode 100644 index 0000000..11fab1f --- /dev/null +++ b/src/org/noreply/fancydress/type3/Path.java @@ -0,0 +1,39 @@ +package org.noreply.fancydress.type3; + +import org.noreply.fancydress.crypto.*; +import org.noreply.fancydress.directory.*; +import org.noreply.fancydress.misc.Util; +import org.noreply.fancydress.type3.routing.*; +import java.net.InetAddress; + +public class Path { + HalfPath first; + HalfPath second; + + public Path(Directory dir) throws Exception { + Hop[] hops1 = new Hop[4]; + Hop[] hops2 = new Hop[2]; + + Server test = dir.getServer("test1"); + ServerDescriptor desc = test.getDescriptor(); + + Routing route1 = new RoutingIP4(InetAddress.getByName("172.22.118.2"), 48099, test.getKeyID()); + hops1[0] = new Hop(route1, desc.getPacketKey()); + hops1[1] = new Hop(route1, desc.getPacketKey()); + hops1[2] = new Hop(route1, desc.getPacketKey()); + hops1[3] = new Hop(route1, desc.getPacketKey()); + hops2[0] = new Hop(route1, desc.getPacketKey()); + hops2[1] = new Hop(route1, desc.getPacketKey()); + + first = new HalfPath(hops1); + second = new HalfPath(hops2); + } + + public HalfPath getFirstHalf() { + return first; + } + public HalfPath getSecondHalf() { + return second; + } +} + -- cgit v1.2.3