apps.mobile
Class MobileUpdateCapsule
java.lang.Object
|
+--ants.core.Capsule
|
+--apps.mobile.MobileUpdateCapsule
- public class MobileUpdateCapsule
- extends Capsule
Mobile update capsule processor - This will update forwarding information
on routers so that MobileCapsules can direct themselves to the proper
destination
- Author:
- David Wetherall
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)
Update the forwarding information on the foreign and home routers. |
int |
length()
Return the length of the capsule header that
all capsule encodings will include. |
Methods inherited from class ants.core.Capsule |
create,
encodeCapsuleForSend,
findExtension,
findMID,
findPID,
getDst,
getPrevious,
getSrc,
getTTL,
prime,
setDst,
toString |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
MobileUpdateCapsule
public MobileUpdateCapsule()
MobileUpdateCapsule
public MobileUpdateCapsule(int dst,
int next,
int forward)
- Construct an update capsule
- Parameters:
dst
- The address of the home routernext
- The address of the foreign routerforward
- The address of the mobile on the foreign network
length
public int length()
- Description copied from class: Capsule
- Return the length of the capsule header that
all capsule encodings will include.
- Overrides:
- length in class Capsule
- Tags copied from class: Capsule
- Returns:
- the length of the capsule header
encode
public Xdr encode()
- Description copied from class: Capsule
- Encode this capsule's header into a new Xdr. Return the
new Xdr.
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)
- Overrides:
- encode in class Capsule
- Tags copied from class: Capsule
- Returns:
- the new Xdr representing this capsule.
- See Also:
#xdr
decode
public Xdr decode()
- Description copied from class: Capsule
- Decode a capsule header from this Capsule's
xdr field.
- Overrides:
- decode in class Capsule
- Tags copied from class: Capsule
- Returns:
- the new Xdr based on the current xdr.
evaluate
public boolean evaluate(Node n)
- Update the forwarding information on the foreign and home routers.
The MobileCapsules then use this forwarding information to get to
the right location.
- Overrides:
- evaluate in class Capsule
- Tags copied from class: Capsule
- Parameters:
node
- the local node interface- Returns:
- an indicationof whether the forwarding was
successful.
This documentation is Copyright (C) 1998-2001 The University of Utah and the University of Washington. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for ANTS v2.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/