|
|||||||||
| 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 UserAPIpublic boolean setTimer(long time)
setTimer in interface UserAPIpublic boolean cancelTimer()
cancelTimer in interface UserAPIpublic long getDEClimit()
getDEClimit in interface UserAPI
public UNL getUNL()
throws java.io.IOException
getUNL in interface UserAPIpublic void enableUNL(boolean update)
UserAPIenableUNL in interface UserAPIpublic long getCurrentTag()
getCurrentTag in interface UserAPIpublic 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 UserAPIpublic int getInt(java.lang.String name)
getInt in interface UserAPIpublic long getLong(java.lang.String name)
getLong in interface UserAPIpublic byte[] getByteArray(java.lang.String name)
getByteArray in interface UserAPIpublic long getSenderID()
getSenderID in interface UserAPIpublic byte[] getSecretKey()
getSecretKey in interface UserAPIpublic byte[] getSecretEncKey()
getSecretEncKey in interface UserAPIpublic byte[] getSecretMacKey()
getSecretMacKey in interface UserAPIpublic boolean getSecretKeyUpdated()
getSecretKeyUpdated in interface UserAPIpublic boolean putCipherEnc(javax.crypto.Cipher c)
putCipherEnc in interface UserAPIpublic javax.crypto.Cipher getCipherEnc()
getCipherEnc in interface UserAPIpublic boolean putCipherDec(javax.crypto.Cipher c)
putCipherDec in interface UserAPIpublic javax.crypto.Cipher getCipherDec()
getCipherDec in interface UserAPIpublic boolean putCipherMac(javax.crypto.Mac m)
putCipherMac in interface UserAPIpublic javax.crypto.Mac getCipherMac()
getCipherMac in interface UserAPIpublic void debugON()
debugON in interface UserAPIpublic void debugOFF()
debugOFF in interface UserAPIpublic void debug(java.lang.String s)
debug in interface UserAPIprotected void logDebug(java.lang.String s)
public void logUdp(java.lang.String s)
logUdp in interface UserAPIpublic static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||