|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.core.Capsule | +--ants.core.DataCapsule | +--apps.ping.PingCapsule
Ping capsule.
Field Summary | |
boolean |
ping
|
int |
seqId
Sequence number for the ping capsule. |
Fields inherited from class ants.core.DataCapsule |
dpt,
spt,
VERSION |
Fields inherited from class ants.core.Capsule |
MAX_TTL |
Constructor Summary | |
PingCapsule()
|
|
PingCapsule(short sa,
short da,
int na,
ByteArray d)
|
Method Summary | |
Xdr |
decode()
Decode a capsule header from this Capsule's xdr field. |
Xdr |
encode()
Encode this capsule's header into a new Xdr. |
boolean |
evaluate(Node n)
Forwarding function for DataCapsules. |
int |
length()
Return length of this data capsule. |
Methods inherited from class ants.core.DataCapsule |
getData,
setData,
toString |
Methods inherited from class ants.core.Capsule |
create,
encodeCapsuleForSend,
findExtension,
findMID,
findPID,
getDst,
getPrevious,
getSrc,
getTTL,
prime,
setDst |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public boolean ping
public int seqId
Constructor Detail |
public PingCapsule()
public PingCapsule(short sa, short da, int na, ByteArray d)
Method Detail |
public int length()
Capsule.length()
public Xdr encode()
Because this header must go first in the Xdr, this encoder unilaterally sets the xdr buffer pointer to the beginning of the buffer and writes its data there.
The format of the Xdr is:
MethodID (16 bytes) src address ( 4 bytes) dst address ( 4 bytes) previous address ( 4 bytes) TTL ( 4 bytes)
#xdr
public Xdr decode()
public boolean evaluate(Node n)
node
- the local node interface
|
ANTS v2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |