public interface CircuitNode
Circuit| Modifier and Type | Method and Description |
|---|---|
boolean |
considerSendingSendme()
Examines the delivery window and determines if it would be an appropriate time to
send a RELAY_SENDME cell.
|
void |
decrementDeliverWindow()
This method is called when a RELAY_DATA cell is received from this node to decrement
the deliver window counter.
|
boolean |
decryptBackwardCell(Cell cell) |
void |
encryptForwardCell(RelayCell cell)
Encrypt a
RelayCell for this node with the current
'forward' cipher state. |
byte[] |
getForwardDigestBytes()
Return the current 'forward' running digest value for this
node as an array of
TOR_DIGEST_SIZE bytes. |
CircuitNode |
getPreviousNode()
Return the
CircuitNode which immediately preceeds this
one in the circuit node chain or null if this is
the first hop. |
Router |
getRouter()
Return the
Router associated with this node. |
void |
incrementSendWindow()
This method is called to signal that a RELAY_SENDME cell has been received from this
node and the packaging window should be incremented.
|
void |
updateForwardDigest(RelayCell cell)
Update the 'forward' cryptographic digest state for this
node with the contents of
cell |
void |
waitForSendWindow()
Return immediately if the packaging window for this node is open (ie: greater than 0), otherwise
block until the circuit is destroyed or the window is incremented by receiving a RELAY_SENDME cell
from this node.
|
void |
waitForSendWindowAndDecrement()
If the packaging window for this node is open (ie: greater than 0) this method
decrements the packaging window by 1 and returns immediately, otherwise it will
block until the circuit is destroyed or the window is incremented by receiving
a RELAY_SENDME cell from this node.
|
Router getRouter()
Router associated with this node.Router for this hop of the circuit chain.void updateForwardDigest(RelayCell cell)
cellcell - The RelayCell to add to the digest.byte[] getForwardDigestBytes()
TOR_DIGEST_SIZE bytes.void encryptForwardCell(RelayCell cell)
RelayCell for this node with the current
'forward' cipher state.cell - The RelayCell to encrypt.CircuitNode getPreviousNode()
CircuitNode which immediately preceeds this
one in the circuit node chain or null if this is
the first hop.CircuitNode in the chain or
null if this is the first node.void waitForSendWindow()
void waitForSendWindowAndDecrement()
void incrementSendWindow()
void decrementDeliverWindow()
boolean considerSendingSendme()
boolean decryptBackwardCell(Cell cell)
Copyright © 2015. All rights reserved.