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

Re: Janos questions: PID and such



There is a text file hidden in the ants/ants directory called
'On_IDs.txt' that should answer these questions.  (At least that's
what it is supposed to do...)  I should push that text into the Janos
Programming Manual.

Graham Phillips wrote:
> 1) The MID, as I understand it, is the MD5 checksum over the class 
> byte code of the active application.  Is this correct?  So the MID
> is effectively generated at time that the active application is
> constructed.  Right? 

The MID is the checksum over the Code, Group and Protocol *checksums*.
Thus it identifies a chunk of code for a specific group in a specific
protocol.  This way two protocols that have the same capsule code in
them will put different MIDs on the capsules.

The MID is generated when the Protocol is loaded/defined.  (see
ants.ants.Protocol::activate().)

> 2) What is the PID?  And how is it related to the MID?  How is the PID
> generated?  When is it generated?

The PID is a hash over the GIDs.  It is also generated when a Protocol
is activated.  GIDs are hashes over the CodeIDs in a CodeGroup.  (A
CodeGroup is the unit of code shipment.  A Protocol is composed of one
or more CodeGroups).  The CodeID is a hash over the bytecode of the
class.

> 3) We have found that MIDIDRequestCapsule is used to invoke the 
> transmission of the MIDIDResponseCapsule from the previous hop.  
> Presumably the invocation of a capsule is done by sending an 
> MIDIDRequestCapsule?  But how is this MIDIDRequestCapsule sent?  
> How is this capsule sent?

The MIDIDRequestCapsule is sent from ants.ants.UnknownPacketHandler.
The ANTSR core sends this type of capsule off when it gets a capsule
containing a MID it has never seen before.

We added the MIDIDRequest-response sequence for ANTSR.  Other than
that, the IDs and their derivations are all from the original ANTS.  I
belive it would be possible to remove the MIDIDRequest-response
packets by replacing the MIDID at the head of each capsule with a PID
plus a single-byte per-Protocol packet id in the Capsule.  However, I
haven't had time to put much more thought than this into it.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann@cs.utah.edu
    Not many people realize just how well known I am -- Anonymous




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