[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configurable Anetid



	Here are our changes to ANTS-2.0.0 for making the ANEP Type ID
value configurable at runtime.  The changes were created by Yu He
<yuhe@isi.edu>, with some input from me.  Using these changes, the
configuration file will accept a new configuration line, "anepid".
For example, here's the configuration file we're currently using
in the ABone topology for ANTS-2.0.0:

# ABone configuration file for core nodes

# Node 1
anepid 11.11.11.0 36
node 11.11.11.0 -log 255 -routes core.routes -updateRoutes true
channel 11.11.11.0 stdin -proxyaddr son.isi.edu:3322 -log 255
application 11.11.11.0 ants.dante.DanteServer -start 11.11.11.1 -end 11.11.11.255 -principal DanteUser

#### Node 3
anepid 13.13.13.0 36
node 13.13.13.0 -log 255 -routes core.routes -updateRoutes true
channel 13.13.13.0 stdin -proxyaddr abone-01.cs.princeton.edu:3322 -log 255
application 13.13.13.0 ants.dante.DanteServer -start 13.13.13.1 -end 13.13.13.255 -principal DanteUser

# Node 4
anepid 14.14.14.0 36
node 14.14.14.0 -log 255 -routes core.routes -updateRoutes true
channel 14.14.14.0 stdin -proxyaddr d05.csl.sri.com:3322 -log 255
application 14.14.14.0 ants.dante.DanteServer -start 14.14.14.1 -end 14.14.14.255 -principal DanteUser

# Node 5
anepid 15.15.15.0 36
node 15.15.15.0 -log 255 -routes core.routes -updateRoutes true
channel 15.15.15.0 stdin -proxyaddr dad.isi.edu:3322 -log 255
application 15.15.15.0 ants.dante.DanteServer -start 15.15.15.1 -end 15.15.15.255 -principal DanteUser

# Node 6
anepid 16.16.16.0 36
node 16.16.16.0 -log 255 -routes core.routes -updateRoutes true
channel 16.16.16.0 stdin -proxyaddr aegir.aero.org:3322 -log 255
application 16.16.16.0 ants.dante.DanteServer -start 16.16.16.1 -end 16.16.16.255 -principal DanteUser

# Node 7
anepid 17.17.17.0 36
node 17.17.17.0 -log 255 -routes core.routes -updateRoutes true
channel 17.17.17.0 stdin -proxyaddr d02.csl.sri.com:3322 -log 255
application 17.17.17.0 ants.dante.DanteServer -start 17.17.17.1 -end 17.17.17.255 -principal DanteUser

connect 11.11.11.0 15.15.15.0
connect 11.11.11.0 16.16.16.0
connect 13.13.13.0 14.14.14.0
connect 13.13.13.0 17.17.17.0
connect 14.14.14.0 16.16.16.0
connect 15.15.15.0 17.17.17.0

	I don't feel that using a separate "anepid" line was the right
choice; I think it would be more appropriate to maye "-anepid val" be
an option on the channel.  However, it wasn't obvious how to implement
the latter approach, whereas we could be fairly confident that the
approach we selected was going to work.  What do you think?

	Here are the diffs.  I extracted them from our CVS tree, and I
apologize if I overlooked any line number offsets due to other changes
(debugging messages, for the most part) that aren't included here.


40% cvs diff -r1.2 -r1.1 ANEPFlow.java 
Index: ANEPFlow.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/ANEPFlow.java,v
retrieving revision 1.2
retrieving revision 1.1
diff -r1.2 -r1.1
79c79
<       if (typeID != Capsule.antsType) {
---
>       if (typeID != Capsule.ANTSTYPE) {
44% cvs diff -r1.2 -r1.1 ANTSDemultiplexKey.java
Index: ANTSDemultiplexKey.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/ANTSDemultiplexKey.java,v
retrieving revision 1.2
retrieving revision 1.1
diff -r1.2 -r1.1
48c48
<       super(flow, Capsule.antsType);
---
>       super(flow, Capsule.ANTSTYPE);
31% cvs diff -r1.4 -r1.1 Capsule.java
Index: Capsule.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/Capsule.java,v
retrieving revision 1.4
retrieving revision 1.1
diff -r1.4 -r1.1
72c72
<     static short antsType;                     // MIT ANTS type
---
>     static final short ANTSTYPE = 18; // MIT ANTS type
403c403
<       xdr.PUT(antsType);
---
>       xdr.PUT(ANTSTYPE);
35% cvs diff -r1.5 -r1.1 ConfigurationManager.java
Index: ConfigurationManager.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/ConfigurationManager.java,v
retrieving revision 1.5
retrieving revision 1.1
diff -r1.5 -r1.1
107,113c107
<                 if (command[0].equals("anepid"))  {
<                    //FORMAT: anepid <node addr> <anepid number> 
<                           if (command.length < 3)
<                   throw new ArrayIndexOutOfBoundsException("insufficient arguments for anepid");
<                     PrimordialNode.setAnetID(Integer.parseInt(command[2]));
< 
<       } else if (command[0].equals("node")) {
---
>       if (command[0].equals("node")) {
37% cvs diff -r1.5 -r1.1 PrimordialNode.java 
Index: PrimordialNode.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/PrimordialNode.java,v
retrieving revision 1.5
retrieving revision 1.1
diff -r1.5 -r1.1
731,739d730
<    /**
<     * Set ANEP TypeID
<     * added by Yu He, USC/ISI,  04/23/2001
<     */
<     static void setAnetID(int anepid)
<     {
<               Capsule.antsType = (short) anepid;
<      }
< 
27% cvs diff -r1.3 -r1.2 UnknownPacketHandler.java 
Index: UnknownPacketHandler.java
===================================================================
RCS file: /nfs/dart/dartisi/ARP/CVSHOME/ants/ants-2.0.0/src/ants/core/UnknownPacketHandler.java,v
retrieving revision 1.3
retrieving revision 1.2
diff -r1.3 -r1.2
59c59
<                                         Capsule.antsType));
---
>                                         Capsule.ANTSTYPE));


					Craig Milo Rogers





[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah