A path to a known destination.
An instance of this class represents a path to a known
destination d.
The instance members are:
`gw': the gateway of the route. Our next hop. It is an instance of the
| class AggregatedNeighbour.
`rem_at_gw': a REM (Route Efficience Measure) of the path from the
| gateway to the destination d. It is an instance of the class
| REM or a derivative.
`hops': a List of HCoord of the hops represented by this
| path from the gateway gw to the destination d.
| gw and d are not included.
`gid': a instance of GNodeid, it is the ID of the gnode that this class
| represents, as it is reported by this path.
GNode I.D.
An instance is valid when we have all three values:
|#1 (elderliness) is the elderliness of the gnode inside its upper level gnode.
|#2 (eldest_internal_elderliness) is the elderliness of the eldest gnode inside me.
|#3 (eldest_internal_id) is the ID of the eldest gnode inside me. And it's also my gnode's ID.
In more details:
| . for a gnode of level 0, values #2 has no meaning (will always be 0)
| . for a gnode of level 'levels', values #1 and #2 have no meaning. Its value #3 is the netid.
This class (and the following classes and interfaces) is used to perform
RPC call using the following form:
var x = remote_instance.property1.property2.method0(p1, p2, p3);
instead of:
RemoteCall rc = new RemoteCall();
rc.method_name = "property1.property2.method0";
rc.params = new ISerializable[3];
rc.params[0] = p1;
rc.params[1] = p2;
rc.params[2] = p3;
var x = (SerClass)remote_instance.rpc_call(rc);
int
COORD_DUPLICATION
int
MAX_BNODES
uchar
[] data, out uchar
[] response)
This callback is used to interpret a request. It is called this way:
| rpcdispatcher, data, response = self.callback(caller, data_request)
where the arguments are:
| caller: a CallerInfo instance.
| data_request: what has been read from socket as a request.
and the results are:
| rpcdispatcher: if not None, we must do the call to the remotable method:
| rpcdispatcher.marshalled_dispatch(caller, data)
| response: if rpcdispatcher is None and response is not None then send response.
| if rpcdispatcher is None and response is None then do nothing.
List
<RPCDispatcher> rpcdispatchers, out uchar
[] data)
uchar
[] data, out List
<string
> devs_response)
string
nic_name)
int
lvl_to_bits (int
levels, int
gsize, int
lvl)
int
bits_to_lvl (int
levels, int
gsize, int
bits)
string
nip_to_str (int
levels, int
gsize, NIP nip)
int
levels, int
gsize, string
ipstr)
ArrayList
<int
> valid_ids (int
levels, int
gsize, int
lvl, PartialNIP partial_nip)
int
gsize, out string
ipstr, out string
bits)
int
levels, int
gsize, string
ipstr, string
bits)