Uses of Class
net.i2p.router.transport.udp.UDPPacket
Package
Description
The UDP transport (also known as 'SSU transport') allows passing I2P messages on top of UDP.
-
Uses of UDPPacket in net.i2p.router.transport.udp
Modifier and TypeMethodDescriptionstatic UDPPacket
UDPPacket.acquire
(RouterContext ctx, boolean inbound) PacketBuilder.buildACK
(PeerState peer, List<ACKBitfield> ackBitfields) Build the ack packet.PacketBuilder2.buildACK
(PeerState2 peer) Build the ack packet.PacketBuilder.buildHolePunch
(InetAddress to, int port) Creates an empty unauthenticated packet for hole punching.PacketBuilder2.buildHolePunch
(InetAddress to, int port, SessionKey introKey, long sendID, long rcvID, byte[] signedData) Out-of-session, containing a RelayResponse block.PacketBuilder.buildPacket
(byte[] data, InetAddress to, int port) TESTING ONLY.PacketBuilder.buildPacket
(List<PacketBuilder.Fragment> fragments, PeerState peer, Collection<Long> ackIdsRemaining, int newAckCount, List<ACKBitfield> partialACKsRemaining) PacketBuilder.buildPacket
(OutboundMessageState state, int fragment, PeerState peer, Collection<Long> ackIdsRemaining, int newAckCount, List<ACKBitfield> partialACKsRemaining) This builds a data packet (PAYLOAD_TYPE_DATA).PacketBuilder2.buildPacket
(List<PacketBuilder.Fragment> fragments, List<SSU2Payload.Block> otherBlocks, PeerState2 peer) PacketBuilder2.buildPacket
(List<PacketBuilder.Fragment> fragments, PeerState2 peer) PacketBuilder2.buildPacket
(OutboundMessageState state, int fragment, PeerState2 peer) This builds a data packet (PAYLOAD_TYPE_DATA).PacketBuilder.buildPeerTestFromAlice
(InetAddress toIP, int toPort, SessionKey toIntroKey, long nonce, SessionKey aliceIntroKey) Build a packet as if we are Alice and we either want Bob to begin a peer test or Charlie to finish a peer test.PacketBuilder.buildPeerTestFromAlice
(InetAddress toIP, int toPort, SessionKey toCipherKey, SessionKey toMACKey, long nonce, SessionKey aliceIntroKey) Build a packet as if we are Alice and we either want Bob to begin a peer test or Charlie to finish a peer test.PacketBuilder2.buildPeerTestFromAlice
(byte[] signedData, PeerState2 bob) Build a packet as Alice, to Bob to begin a peer test.PacketBuilder2.buildPeerTestFromAlice
(InetAddress toIP, int toPort, SessionKey introKey, long sendID, long rcvID, byte[] signedData) Build a packet as Alice to Charlie.PacketBuilder.buildPeerTestToAlice
(InetAddress aliceIP, int alicePort, SessionKey aliceIntroKey, SessionKey charlieIntroKey, long nonce) Build a packet as if we are either Bob or Charlie and we are helping test Alice.PacketBuilder.buildPeerTestToAlice
(InetAddress aliceIP, int alicePort, SessionKey aliceCipherKey, SessionKey aliceMACKey, SessionKey charlieIntroKey, long nonce) Build a packet as if we are either Bob or Charlie and we are helping test Alice.PacketBuilder2.buildPeerTestToAlice
(int code, Hash charlieHash, byte[] signedData, PeerState2 alice) Build a packet as Bob to Alice, with the response from Charlie, or a rejection by Bob.PacketBuilder2.buildPeerTestToAlice
(InetAddress aliceIP, int alicePort, SessionKey introKey, boolean firstSend, long sendID, long rcvID, byte[] signedData) Build a packet as Charlie to Alice.PacketBuilder.buildPeerTestToBob
(InetAddress bobIP, int bobPort, InetAddress aliceIP, int alicePort, SessionKey aliceIntroKey, long nonce, SessionKey bobCipherKey, SessionKey bobMACKey) Build a packet as if we are Charlie sending Bob a packet verifying that we will help test Alice.PacketBuilder2.buildPeerTestToBob
(int code, byte[] signedData, PeerState2 bob) Build a packet as Charlie to Bob verifying that we will help test Alice.PacketBuilder.buildPeerTestToCharlie
(InetAddress aliceIP, int alicePort, SessionKey aliceIntroKey, long nonce, InetAddress charlieIP, int charliePort, SessionKey charlieCipherKey, SessionKey charlieMACKey) Build a packet as if we are Bob sending Charlie a packet to help test Alice.PacketBuilder2.buildPeerTestToCharlie
(Hash aliceHash, byte[] signedData, PeerState2 charlie) Build a packet as Bob to Charlie to help test Alice.An ACK packet with no acks.PacketBuilder2.buildPing
(PeerState2 peer) A DATA packet with padding only.(package private) UDPPacket
PacketBuilder.buildRelayIntro
(RemoteHostId alice, PeerState charlie, UDPPacketReader.RelayRequestReader request) (package private) UDPPacket
PacketBuilder2.buildRelayIntro
(byte[] signedData, PeerState2 charlie) From Bob to Charlie.(package private) UDPPacket
PacketBuilder2.buildRelayRequest
(byte[] signedData, PeerState2 bob) From Alice to Bob.(package private) UDPPacket
PacketBuilder.buildRelayResponse
(RemoteHostId alice, PeerState charlie, long nonce, SessionKey cipherKey, SessionKey macKey) (package private) UDPPacket
PacketBuilder2.buildRelayResponse
(byte[] signedData, PeerState2 state) From Charlie to Bob or Bob to Alice.PacketBuilder2.buildRetryPacket
(InboundEstablishState2 state, int terminationCode) Build a new Retry packet for the given peer, encrypting it as necessary.PacketBuilder.buildSessionConfirmedPackets
(OutboundEstablishState state, RouterIdentity ourIdentity) Build a new series of SessionConfirmed packets for the given peer, encrypting it as necessary.PacketBuilder2.buildSessionConfirmedPackets
(OutboundEstablishState2 state, RouterInfo ourInfo) Build a new series of SessionConfirmed packets for the given peer, encrypting it as necessary.PacketBuilder.buildSessionCreatedPacket
(InboundEstablishState state, int externalPort, SessionKey ourIntroKey) Build a new SessionCreated packet for the given peer, encrypting it as necessary.PacketBuilder2.buildSessionCreatedPacket
(InboundEstablishState2 state) Build a new SessionCreated packet for the given peer, encrypting it as necessary.PacketBuilder.buildSessionDestroyPacket
(InboundEstablishState peer) Build a destroy packet, which contains a header but no body.PacketBuilder.buildSessionDestroyPacket
(OutboundEstablishState peer) Build a destroy packet, which contains a header but no body.PacketBuilder.buildSessionDestroyPacket
(PeerState peer) Build a destroy packet, which contains a header but no body.PacketBuilder2.buildSessionDestroyPacket
(int reason, PeerState2 peer) Build a data packet with a termination block.PacketBuilder.buildSessionRequestPacket
(OutboundEstablishState state) Build a new SessionRequest packet for the given peer, encrypting it as necessary.PacketBuilder2.buildSessionRequestPacket
(OutboundEstablishState2 state) Build a new SessionRequest packet for the given peer, encrypting it as necessary.PacketBuilder2.buildTokenRequestPacket
(OutboundEstablishState2 state) Build a new SessionRequest packet for the given peer, encrypting it as necessary.InboundEstablishState2.getRetransmitSessionCreatedPacket()
OutboundEstablishState2.getRetransmitSessionRequestPacket()
UDPEndpoint.receive()
Blocking call to receive the next inbound UDP packet from any peer.PacketHandler.receiveNext()
Blocking call to retrieve the next inbound packet, or null if we have shut down.Modifier and TypeMethodDescriptionPacketBuilder.buildRelayRequest
(UDPTransport transport, EstablishmentManager emgr, OutboundEstablishState state, SessionKey ourIntroKey) build intro packets for each of the published introducersOutboundMessageFragments.getNextVolley()
Fetch all the packets for a message volley, blocking until there is a message which can be fully transmitted (or the transport is shut down).Modifier and TypeMethodDescriptionstatic void
SSU2Header.acceptTrialDecrypt
(UDPPacket packet, SSU2Header.Header header) Copy the header back to the packet.void
Put it on the queue.void
Deprecated.use add(packet)OutboundEstablishState2.confirmedPacketsSent
(UDPPacket[] packets) note that we just sent the SessionConfirmed packets and save them for retransmissionstatic void
SSU2Header.encryptHandshakeHeader
(UDPPacket packet, byte[] key1, byte[] key2) First 64 bytesstatic void
SSU2Header.encryptLongHeader
(UDPPacket packet, byte[] key1, byte[] key2) First 32 bytesstatic void
SSU2Header.encryptShortHeader
(UDPPacket packet, byte[] key1, byte[] key2) First 16 bytes.void
UDPPacketReader.initialize
(UDPPacket packet) void
InboundEstablishState2.queuePossibleDataPacket
(UDPPacket packet) void
PacketHandler.queueReceived
(UDPPacket packet) Blocking call to retrieve the next inbound packet, or null if we have shut down.(package private) void
EstablishmentManager.receiveHolePunch
(RemoteHostId id, UDPPacket packet) Called from PacketHandler.(package private) void
PeerState2.receivePacket
(RemoteHostId from, UDPPacket packet) From different than expected source IP/port(package private) void
PeerState2.receivePacket
(UDPPacket packet) (package private) void
EstablishmentManager.receiveRetry
(OutboundEstablishState2 state, UDPPacket packet) Got a Retry (in response to our outbound SessionRequest or TokenRequest) SSU 2 only.void
OutboundEstablishState2.receiveRetry
(UDPPacket packet) (package private) void
EstablishmentManager.receiveSessionConfirmed
(InboundEstablishState2 state, UDPPacket packet) got a SessionConfirmed (should only happen as part of an inbound establishment) SSU 2 only.InboundEstablishState2.receiveSessionConfirmed
(UDPPacket packet) Receive the last messages in the handshake, and create the PeerState.(package private) void
EstablishmentManager.receiveSessionCreated
(OutboundEstablishState2 state, UDPPacket packet) Got a SessionCreated (in response to our outbound SessionRequest) SSU 2 only.void
OutboundEstablishState2.receiveSessionCreated
(UDPPacket packet) (package private) void
EstablishmentManager.receiveSessionOrTokenRequest
(RemoteHostId from, InboundEstablishState2 state, UDPPacket packet) Got a SessionRequest OR a TokenRequest (initiates an inbound establishment) SSU 2 only.void
InboundEstablishState2.receiveSessionRequestAfterRetry
(UDPPacket packet) All exceptions thrown from here will be fatal.void
PeerTestManager.receiveTest
(RemoteHostId from, UDPPacket packet) Entry point for all out-of-session packets, messages 5-7 only.void
This sends it directly out, bypassing OutboundMessageFragments and the PacketPusher.void
Add the packet to the outobund queue to be sent ASAP (as allowed by the bandwidth limiter) BLOCKING if queue is full.(package private) void
This sends it directly out, bypassing OutboundMessageFragments.static SSU2Header.Header
SSU2Header.trialDecryptHandshakeHeader
(UDPPacket packet, byte[] key1, byte[] key2) Session Request and Session Created only.static SSU2Header.Header
SSU2Header.trialDecryptLongHeader
(UDPPacket packet, byte[] key1, byte[] key2) Retry, Token Request, Peer Test only.static SSU2Header.Header
SSU2Header.trialDecryptShortHeader
(UDPPacket packet, byte[] key1, byte[] key2) Session Confirmed and data phase.ModifierConstructorDescriptionInboundEstablishState2
(RouterContext ctx, UDPTransport transport, UDPPacket packet) Start a new handshake with the given incoming packet, which must be a Session Request or Token Request.