Package net.i2p.router.transport.udp
package net.i2p.router.transport.udp
The UDP transport (also known as 'SSU transport') allows passing I2P messages on top of UDP.
-
ClassDescriptionGeneric means of SACK/NACK transmission for partially or fully received messagesSince the TimedWeightedPriorityMessageQueue.add() was disabled by jrandom in UDPTransport.java on 2006-02-19, and the choke/unchoke was disabled at the same time, all of TWPMQ is pointless, so just do this for now.Coordinate the establishment of new sessions - both inbound and outbound.HMAC implementation based on RFC2104 H(K XOR opad, H(K XOR ipad, text)) modified by jrandom to use the session key byte array directly and to cache a frequently used buffer (called on doFinal).Data for a new connection being established, where the remote peer has initiated the connection with us.Data for a new connection being established, where the remote peer has initiated the connection with us.Organize the received data message fragments, feeding completed messages to the
MessageReceiver
and telling thePeerState
to ACK.Modifiable Long, no lockingHold the raw data fragments of an inbound message.Keep track of inbound and outbound introductions.Count IPsBase queue for messages not yet packetizedPull fully completed fragments off theInboundMessageFragments
queue, parse 'em into I2NPMessages, and stick them on theInNetMessagePool
by way of theUDPTransport
.Get the MTU for the network interface of an address.Data for a new connection being established, where we initiated the connection with a remote peer.Data for a new connection being established, where we initiated the connection with a remote peer.Per-introducer introduction statesCoordinate the outbound fragments and select the next one to be built.throttleMaintain the outbound fragmentation for resending, for a single message.Blocking thread to grab new messages off the outbound queue and plopping them into our active pool.Big ol' class to do all our packet formatting.Class for passing multiple fragments to buildPacket()SSU2 onlyPull inbound packets from the inbound receiver's queue, figure out what peer session they belong to (if any), authenticate and decrypt them with the appropriate keys, and push them to the appropriate handler.Blocking thread to grab new packets off the outbound fragment pool and toss 'em onto the outbound packet queues.Contain all of the state about a UDP connection to a peer.Contain all of the state about a UDP connection to a peer.Initiate a test (we are Alice)Entry points are runTest() to start a new test as Alice, and receiveTest() for all received test packets.Track the state of a peer test.Unique ID for a peer - its IP + port, all bundled into a tidy obj.A Westwood+ bandwidth estimator with a first stage anti-aliasing low pass filter based on RTT, and the time-varying Westwood filter based on inter-arrival time.Container of a long array representing set and unset bits.Encrypt/decrypt headersA temporary structure returned from trial decrypt, with methods to access the fields.SSU2 Payload generation and parsingBase class for blocks to be transmitted.Same format as I2NPBlockFor all callbacks, recommend throwing exceptions only from the handshake.SSU2 Utils and constantsCalculate the HMAC-MD5-128 of a key+message.Weighted priority queue implementation for the outbound messages, coupled with code to fail messages that expire.basic helper to parse out peer info from a udp addressCoordinate the low-level datagram socket, creating and managing the UDPSender and UDPReceiver.Basic delivery unit containing the datagram.To read a packet, initialize this reader with the data and fetch out the appropriate fields.Lowest level component to pull raw UDP datagrams off the wire as fast as possible, controlled by both the bandwidth limiter and the router's throttle.Lowest level packet sender, pushes anything on its queue ASAP.The SSU transport