|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--concast.merged.Merged
Main executable module, also exports user API for applications.
Merged is launched from the CSPd. Separate document describes
Merged arguments.
User API calls are implemented in this class.
All public methods are implementation of UserAPI.
Field Summary | |
static int |
FAIL
|
static int |
FAIL_NOT_ENOUGH_ARGUMENTS
|
static boolean |
LOG_OUT
defines allow or not to use System.out to print internal log messages |
static boolean |
LOG_UDP
|
static int |
LOG_UDP_PORT
|
static int |
MAX_ACTIVE_DECS
Upper bound on number of entries in the mergeStateTable, as described in the spec |
java.lang.Class[] |
Merged_Class
|
static int |
MODE
|
protected java.security.SecureRandom |
random
|
protected byte[] |
secretEncKey
|
protected byte[] |
secretKey
|
protected boolean |
secretKeyUpdated
|
protected byte[] |
secretMacKey
|
static boolean |
UNL_ON
true, is communication with CSPd is ON |
static int |
VERSION
version of merged |
Method Summary | |
boolean |
cancelTimer()
Remove timer for current tag, if any returns true if was removed false, if it was not found in any case, after calling this method there no more timers are pending for current tag |
void |
debug(java.lang.String s)
Print debugging message, for user only |
void |
debugOFF()
Turn debugging of current merged off. |
void |
debugON()
Turn debug option on. |
void |
enableUNL(boolean update)
Disable/Enable UNL updates. |
byte[] |
getByteArray(java.lang.String name)
|
javax.crypto.Cipher |
getCipherDec()
Retrieve (decryption) cipher from the flow state |
javax.crypto.Cipher |
getCipherEnc()
Retrieves (encryption) cipher from the flow state |
javax.crypto.Mac |
getCipherMac()
Retrieve mac cipher from the flow state |
long |
getCurrentTag()
Returns current value of tag |
long |
getDEClimit()
Returns MAX_ACTIVE_DECS as described in the draft Maximum amount of per-flow state kept at a node |
int |
getInt(java.lang.String name)
|
long |
getLong(java.lang.String name)
|
int |
getMyID()
Returns ID to identify current node (currently it is based on the IP address |
byte[] |
getSecretEncKey()
Returns secret key for data encryption/decryption. |
byte[] |
getSecretKey()
Returns secret key material used to generate secret keys. |
boolean |
getSecretKeyUpdated()
Returns true, if the secret key has been updated and sets this flag to false. |
byte[] |
getSecretMacKey()
Returns secret key for secure-hash mac. |
long |
getSenderID()
Returns upstream neighbor ID of the current incoming packet. |
long |
getTimer()
Returns absolute number of milliseconds - time on which second part of the packet processing (buildAndFwdIfDone) has been scheduled, or 0 if it was not scheduled |
UNL |
getUNL()
Returns Upstream Neighbor List |
protected void |
logDebug(java.lang.String s)
Logging to stderr only |
void |
logUdp(java.lang.String s)
Print the message to the UDP socket. |
static void |
main(java.lang.String[] argv)
Parameters: 0 classPath (file or url) 1 SpecBase ... |
boolean |
putByteArray(java.lang.String name,
byte[] value)
|
boolean |
putCipherDec(javax.crypto.Cipher c)
Store decryption cipher in the flow state. |
boolean |
putCipherEnc(javax.crypto.Cipher c)
Allows to store initialized (encryption) cipher in the flow state. |
boolean |
putCipherMac(javax.crypto.Mac m)
Store mac cipher in the flow state. |
boolean |
putInt(java.lang.String name,
int value)
The following 6 method are used to store and retrieve data in the flow state. |
boolean |
putLong(java.lang.String name,
long value)
|
boolean |
setTimer(long time)
This method can only be called from user done() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean UNL_ON
public static final int VERSION
public static final int MAX_ACTIVE_DECS
public static final boolean LOG_OUT
public java.lang.Class[] Merged_Class
public static int MODE
protected byte[] secretKey
protected boolean secretKeyUpdated
protected byte[] secretEncKey
protected byte[] secretMacKey
protected java.security.SecureRandom random
public static final int FAIL
public static final int FAIL_NOT_ENOUGH_ARGUMENTS
public static boolean LOG_UDP
public static final int LOG_UDP_PORT
Method Detail |
public long getTimer()
getTimer
in interface UserAPI
public boolean setTimer(long time)
setTimer
in interface UserAPI
public boolean cancelTimer()
cancelTimer
in interface UserAPI
public long getDEClimit()
getDEClimit
in interface UserAPI
public UNL getUNL() throws java.io.IOException
getUNL
in interface UserAPI
public void enableUNL(boolean update)
UserAPI
enableUNL
in interface UserAPI
public long getCurrentTag()
getCurrentTag
in interface UserAPI
public int getMyID()
getMyID
in interface UserAPI
public boolean putInt(java.lang.String name, int value)
putInt
in interface UserAPI
public boolean putLong(java.lang.String name, long value)
putLong
in interface UserAPI
public boolean putByteArray(java.lang.String name, byte[] value)
putByteArray
in interface UserAPI
public int getInt(java.lang.String name)
getInt
in interface UserAPI
public long getLong(java.lang.String name)
getLong
in interface UserAPI
public byte[] getByteArray(java.lang.String name)
getByteArray
in interface UserAPI
public long getSenderID()
getSenderID
in interface UserAPI
public byte[] getSecretKey()
getSecretKey
in interface UserAPI
public byte[] getSecretEncKey()
getSecretEncKey
in interface UserAPI
public byte[] getSecretMacKey()
getSecretMacKey
in interface UserAPI
public boolean getSecretKeyUpdated()
getSecretKeyUpdated
in interface UserAPI
public boolean putCipherEnc(javax.crypto.Cipher c)
putCipherEnc
in interface UserAPI
public javax.crypto.Cipher getCipherEnc()
getCipherEnc
in interface UserAPI
public boolean putCipherDec(javax.crypto.Cipher c)
putCipherDec
in interface UserAPI
public javax.crypto.Cipher getCipherDec()
getCipherDec
in interface UserAPI
public boolean putCipherMac(javax.crypto.Mac m)
putCipherMac
in interface UserAPI
public javax.crypto.Mac getCipherMac()
getCipherMac
in interface UserAPI
public void debugON()
debugON
in interface UserAPI
public void debugOFF()
debugOFF
in interface UserAPI
public void debug(java.lang.String s)
debug
in interface UserAPI
protected void logDebug(java.lang.String s)
public void logUdp(java.lang.String s)
logUdp
in interface UserAPI
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |