class PeerTestState extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PeerTestState.Role
Roles for peer testing scenarios.
|
| 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 PeerState2 getAlice()
public SessionKey getAliceCipherKey()
public SessionKey getAliceIntroKey()
public InetAddress getAliceIP()
public InetAddress getAliceIPFromCharlie()
public SessionKey getAliceMACKey()
public int getAlicePort()
public int getAlicePortFromCharlie()
public long getBeginTime()
public PeerState getBob()
public InetAddress getBobIP()
public int getBobPort()
public Hash getCharlieHash()
public SessionKey getCharlieIntroKey()
public InetAddress getCharlieIP()
public int getCharliePort()
public long getLastSendTime()
public long getNonce()
public PeerTestState.Role getOurRole()
public List<Hash> getPreviousCharlies()
public long getReceiveAliceTime()
public long getReceiveBobTime()
public long getReceiveCharlieTime()
public long getSendAliceTime()
public long getSendCharlieTime()
public int getStatus()
public byte[] getTestData()
public int incrementPacketsRelayed()
public boolean isIPv6()
public void setAlice(InetAddress ip, int port, Hash hash)
hash - SSU2 only, null for SSU1public void setAlice(PeerState2 alice)
public void setAliceIntroKey(SessionKey key)
public void setAliceIPFromCharlie(InetAddress ip)
public void setAliceKeys(SessionKey ck, SessionKey mk)
ck - cipher keymk - MAC keypublic void setAlicePortFromCharlie(int alicePortFromCharlie)
public void setCharlie(InetAddress ip, int port, Hash hash)
hash - SSU2 only, null for SSU1public void setCharlieIntroKey(SessionKey key)
public void setCharliePort(int charliePort)
public void setLastSendTime(long when)
public void setReceiveAliceTime(long when)
public void setReceiveBobTime(long when)
public void setReceiveCharlieTime(long when)
public void setSendAliceTime(long when)
public void setSendCharlieTime(long when)
public void setStatus(int status)
public void setTestData(byte[] data)