net.i2p.router.transport.udp
class InboundEstablishState extends Object
Modifier and Type | Field and Description |
---|---|
static int |
STATE_CONFIRMED_COMPLETELY
we have completely received all of the confirmation packets
|
static int |
STATE_CONFIRMED_PARTIALLY
we have received one or more confirmation packets
|
static int |
STATE_CREATED_SENT
we have sent a signed creation packet
|
static int |
STATE_FAILED
we are explicitly failing it
|
static int |
STATE_REQUEST_RECEIVED
we have received an initial request
|
static int |
STATE_UNKNOWN
nothin known yet
|
Constructor and Description |
---|
InboundEstablishState(RouterContext ctx,
byte[] remoteIP,
int remotePort,
int localPort) |
Modifier and Type | Method and Description |
---|---|
boolean |
complete() |
boolean |
confirmedFullyReceived()
have we fully received the SessionConfirmed messages from Alice?
|
void |
createdPacketSent()
note that we just sent a SessionCreated packet
|
void |
fail() |
void |
generateSessionKey() |
byte[] |
getBobIP() |
SessionKey |
getCipherKey() |
RouterIdentity |
getConfirmedIdentity()
Who is Alice (null if forged/unknown)
|
long |
getEstablishBeginTime() |
long |
getLifetime()
how long have we been trying to establish this session?
|
SessionKey |
getMACKey() |
long |
getNextSendTime() |
byte[] |
getReceivedOurIP() |
byte[] |
getReceivedX() |
(package private) RemoteHostId |
getRemoteHostId()
RemoteHostId, uniquely identifies an attempt
|
byte[] |
getSentIP()
what IP do they appear to be on?
|
int |
getSentPort()
what port number do they appear to be coming from?
|
long |
getSentRelayTag() |
Signature |
getSentSignature() |
long |
getSentSignedOnTime() |
byte[] |
getSentY() |
int |
getState() |
void |
prepareSessionCreated() |
void |
receiveSessionConfirmed(UDPPacketReader.SessionConfirmedReader conf) |
void |
receiveSessionRequest(UDPPacketReader.SessionRequestReader req) |
boolean |
sessionRequestReceived() |
void |
setNextSendTime(long when) |
void |
setSentRelayTag(long tag) |
String |
toString() |
public static final int STATE_UNKNOWN
public static final int STATE_REQUEST_RECEIVED
public static final int STATE_CREATED_SENT
public static final int STATE_CONFIRMED_PARTIALLY
public static final int STATE_CONFIRMED_COMPLETELY
public static final int STATE_FAILED
public InboundEstablishState(RouterContext ctx, byte[] remoteIP, int remotePort, int localPort)
public int getState()
public boolean complete()
public void receiveSessionRequest(UDPPacketReader.SessionRequestReader req)
public boolean sessionRequestReceived()
public byte[] getReceivedX()
public byte[] getReceivedOurIP()
public void generateSessionKey() throws DHSessionKeyBuilder.InvalidPublicParameterException
public SessionKey getCipherKey()
public SessionKey getMACKey()
public byte[] getSentIP()
public int getSentPort()
public byte[] getBobIP()
public byte[] getSentY()
public void fail()
public long getSentRelayTag()
public void setSentRelayTag(long tag)
public long getSentSignedOnTime()
public void prepareSessionCreated()
public Signature getSentSignature()
public void createdPacketSent()
public long getLifetime()
public long getEstablishBeginTime()
public long getNextSendTime()
public void setNextSendTime(long when)
RemoteHostId getRemoteHostId()
public void receiveSessionConfirmed(UDPPacketReader.SessionConfirmedReader conf)
public boolean confirmedFullyReceived()
public RouterIdentity getConfirmedIdentity()