next up previous
Next: Communications Buffer Up: Enhanced Network Instruction Previous: Enhanced Network Instruction

IP Address Map

Each participating node on the Tierra network maintains a local list, ``IPMap'', of known participating machines. The list is maintained in the form of an array of MapNode structures (see below).

struct NetAddr {
    N32u node;   /* 32 bit IP address of the real machine */
    N16u portnb; /* 16 bit port number for the Tierra socket */
};

typedef struct /* structure for IPMap array */
{   NetAddr address;
    TPingData data;
    I32s PendReq;   /* number of pending TPing requests */
} MapNode;

The TPing part of the structure will be explained in the ``Sensory Mechanism: TPing'' section below.

When a network Tierra process begins, it reads a ``MapFile'' containing the IP addresses and port numbers of all the known participating nodes on the Tierra network. It creates the initial IPMap array from this list. After executing each million instructions, each Tierra node sends a TPing message to each machine on its IPMap list. The target machines, respond by returning a TPing reply. As the replies come in, they are time stamped, in the ``Fresh'' field of the TPing data structure. If a machine has not responded for more than PendReqTime (default to 24 hours), it is assumed to have left the net, and is removed from the IPMap array.

If any kind of message is received from a machine not presently on the IPMap list, it is added to the list. The MapFile on disk is also kept up to date with respect to changes in the IPMap list.



Thomas S.Ray
Tue Jan 14 16:09:05 JST 1997