class PeerTestState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PeerTestState.Role |
Constructor and Description |
---|
PeerTestState(PeerTestState.Role role,
PeerState bob,
boolean isIPv6,
long nonce,
long now) |
Modifier and Type | Method and Description |
---|---|
PeerState2 |
getAlice()
SSU2 only
|
SessionKey |
getAliceCipherKey() |
SessionKey |
getAliceIntroKey() |
InetAddress |
getAliceIP()
If we are Alice, this will contain the IP that Bob says we
can be reached at - the IP Charlie says we can be reached
at is _aliceIPFromCharlie
|
InetAddress |
getAliceIPFromCharlie() |
SessionKey |
getAliceMACKey() |
int |
getAlicePort()
If we are Alice, this will contain the port that Bob says we
can be reached at - the port Charlie says we can be reached
at is _alicePortFromCharlie
|
int |
getAlicePortFromCharlie() |
long |
getBeginTime()
when did this test begin?
|
PeerState |
getBob() |
InetAddress |
getBobIP() |
int |
getBobPort() |
Hash |
getCharlieHash()
SSU2 only, null for SSU1.
|
SessionKey |
getCharlieIntroKey() |
InetAddress |
getCharlieIP() |
int |
getCharliePort() |
long |
getLastSendTime()
when did we last send out a packet?
|
long |
getNonce() |
PeerTestState.Role |
getOurRole()
Are we Alice, bob, or Charlie.
|
List<Hash> |
getPreviousCharlies()
SSU2 only, BOB only, else returns null.
|
long |
getReceiveAliceTime()
when did we last hear from alice?
|
long |
getReceiveBobTime()
when did we last hear from bob?
|
long |
getReceiveCharlieTime()
when did we last hear from charlie?
|
long |
getSendAliceTime()
when did we send to alice, SSU2 Bob only
|
long |
getSendCharlieTime()
when did we send to Charlie, SSU2 Alice only
|
int |
getStatus()
what code did we send to alice, SSU2 Bob only
|
byte[] |
getTestData()
Get for retransmission.
|
int |
incrementPacketsRelayed() |
boolean |
isIPv6()
Is this an IPv6 test?
|
void |
setAlice(InetAddress ip,
int port,
Hash hash) |
void |
setAlice(PeerState2 alice)
SSU2 only
|
void |
setAliceIntroKey(SessionKey key) |
void |
setAliceIPFromCharlie(InetAddress ip) |
void |
setAliceKeys(SessionKey ck,
SessionKey mk) |
void |
setAlicePortFromCharlie(int alicePortFromCharlie) |
void |
setCharlie(InetAddress ip,
int port,
Hash hash) |
void |
setCharlieIntroKey(SessionKey key) |
void |
setCharliePort(int charliePort) |
void |
setLastSendTime(long when) |
void |
setReceiveAliceTime(long when) |
void |
setReceiveBobTime(long when) |
void |
setReceiveCharlieTime(long when) |
void |
setSendAliceTime(long when)
when did we send to alice, SSU2 Bob only
|
void |
setSendCharlieTime(long when)
when did we send to Charlie, SSU2 Alice only
|
void |
setStatus(int status)
what code did we send to alice, SSU2 Bob only
|
void |
setTestData(byte[] data)
Save for retransmission.
|
String |
toString() |
public PeerTestState(PeerTestState.Role role, PeerState bob, boolean isIPv6, long nonce, long now)
bob
- null if role is BOBpublic long getNonce()
public PeerTestState.Role getOurRole()
public PeerState getBob()
public boolean isIPv6()
public InetAddress getAliceIP()
public PeerState2 getAlice()
public void setAlice(PeerState2 alice)
public void setAlice(InetAddress ip, int port, Hash hash)
hash
- SSU2 only, null for SSU1public InetAddress getBobIP()
public InetAddress getCharlieIP()
public Hash getCharlieHash()
public void setCharlie(InetAddress ip, int port, Hash hash)
hash
- SSU2 only, null for SSU1public List<Hash> getPreviousCharlies()
public InetAddress getAliceIPFromCharlie()
public void setAliceIPFromCharlie(InetAddress ip)
public int getAlicePort()
public int getBobPort()
public int getCharliePort()
public void setCharliePort(int charliePort)
public int getAlicePortFromCharlie()
public void setAlicePortFromCharlie(int alicePortFromCharlie)
public SessionKey getAliceIntroKey()
public void setAliceIntroKey(SessionKey key)
public SessionKey getAliceCipherKey()
public SessionKey getAliceMACKey()
public void setAliceKeys(SessionKey ck, SessionKey mk)
ck
- cipher keymk
- MAC keypublic SessionKey getCharlieIntroKey()
public void setCharlieIntroKey(SessionKey key)
public long getBeginTime()
public long getLastSendTime()
public void setLastSendTime(long when)
public long getReceiveAliceTime()
public void setReceiveAliceTime(long when)
public long getReceiveBobTime()
public void setReceiveBobTime(long when)
public long getReceiveCharlieTime()
public void setReceiveCharlieTime(long when)
public long getSendAliceTime()
public void setSendAliceTime(long when)
public long getSendCharlieTime()
public void setSendCharlieTime(long when)
public int getStatus()
public void setStatus(int status)
public byte[] getTestData()
public void setTestData(byte[] data)
public int incrementPacketsRelayed()