Uses of Class
net.i2p.router.transport.udp.UDPPacket
Packages that use 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
Methods in net.i2p.router.transport.udp that return UDPPacketModifier and TypeMethodDescriptionstatic UDPPacketUDPPacket.acquire(RouterContext ctx, boolean inbound) PacketBuilder2.buildACK(PeerState2 peer) Build the ack packet.PacketBuilder2.buildHolePunch(InetAddress to, int port, SessionKey introKey, long sendID, long rcvID, byte[] signedData) Out-of-session, containing a RelayResponse block.PacketBuilder2.buildPacket(List<PacketBuilder.Fragment> fragments, List<SSU2Payload.Block> otherBlocks, SSU2Sender 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).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.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(int code, Hash charlieHash, byte[] signedData, SSU2Payload.Block riBlock, 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.PacketBuilder2.buildPeerTestToBob(int code, byte[] signedData, PeerState2 bob) Build a packet as Charlie to Bob verifying that we will help test Alice.PacketBuilder2.buildPeerTestToCharlie(Hash aliceHash, byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie) Build a packet as Bob to Charlie to help test Alice.PacketBuilder2.buildPing(PeerState2 peer) A DATA packet with padding only.(package private) UDPPacketPacketBuilder2.buildRelayIntro(byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie) From Bob to Charlie.(package private) UDPPacketPacketBuilder2.buildRelayRequest(byte[] signedData, PeerState2 bob) From Alice to Bob.(package private) UDPPacketPacketBuilder2.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.PacketBuilder2.buildRetryPacket(RemoteHostId to, SocketAddress toAddr, long destID, long srcID, int terminationCode) Build a new Retry packet with a termination code, for a rejection direct from the EstablishmentManager.PacketBuilder2.buildSessionConfirmedPackets(OutboundEstablishState2 state, RouterInfo ourInfo) Build a new series of SessionConfirmed packets 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.PacketBuilder2.buildSessionDestroyPacket(int reason, SSU2Sender peer) Build a data packet with a termination block.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.Methods in net.i2p.router.transport.udp that return types with arguments of type UDPPacketModifier and TypeMethodDescriptionOutboundMessageFragments.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).Methods in net.i2p.router.transport.udp with parameters of type UDPPacketModifier and TypeMethodDescriptionstatic voidSSU2Header.acceptTrialDecrypt(UDPPacket packet, SSU2Header.Header header) Copy the header back to the packet.voidPut it on the queue.voidDeprecated.use add(packet)OutboundEstablishState2.confirmedPacketsSent(UDPPacket[] packets) note that we just sent the SessionConfirmed packets and save them for retransmissionstatic voidSSU2Header.encryptHandshakeHeader(UDPPacket packet, byte[] key1, byte[] key2) First 64 bytesstatic voidSSU2Header.encryptLongHeader(UDPPacket packet, byte[] key1, byte[] key2) First 32 bytesstatic voidSSU2Header.encryptShortHeader(UDPPacket packet, byte[] key1, byte[] key2) First 16 bytes.voidInboundEstablishState2.queuePossibleDataPacket(UDPPacket packet) voidPacketHandler.queueReceived(UDPPacket packet) Blocking call to retrieve the next inbound packet, or null if we have shut down.(package private) voidEstablishmentManager.receiveHolePunch(RemoteHostId id, UDPPacket packet) Called from PacketHandler.(package private) voidPeerState2.receivePacket(RemoteHostId from, UDPPacket packet) From different than expected source IP/port(package private) voidPeerState2.receivePacket(UDPPacket packet) (package private) voidPeerStateDestroyed.receivePacket(RemoteHostId from, UDPPacket packet) (package private) voidPeerStateDestroyed.receivePacket(UDPPacket packet) (package private) voidEstablishmentManager.receiveRetry(OutboundEstablishState2 state, UDPPacket packet) Got a Retry (in response to our outbound SessionRequest or TokenRequest) SSU 2 only.voidOutboundEstablishState2.receiveRetry(UDPPacket packet) (package private) voidEstablishmentManager.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) voidEstablishmentManager.receiveSessionCreated(OutboundEstablishState2 state, UDPPacket packet) Got a SessionCreated (in response to our outbound SessionRequest) SSU 2 only.voidOutboundEstablishState2.receiveSessionCreated(UDPPacket packet) (package private) voidEstablishmentManager.receiveSessionOrTokenRequest(RemoteHostId from, InboundEstablishState2 state, UDPPacket packet) Got a SessionRequest OR a TokenRequest (initiates an inbound establishment) SSU 2 only.voidInboundEstablishState2.receiveSessionOrTokenRequestAfterRetry(UDPPacket packet) All exceptions thrown from here will be fatal.voidPeerTestManager.receiveTest(RemoteHostId from, UDPPacket packet) Entry point for all out-of-session packets, messages 5-7 only.voidThis sends it directly out, bypassing OutboundMessageFragments and the PacketPusher.voidAdd the packet to the outobund queue to be sent ASAP (as allowed by the bandwidth limiter) BLOCKING if queue is full.(package private) voidThis sends it directly out, bypassing OutboundMessageFragments.static SSU2Header.HeaderSSU2Header.trialDecryptHandshakeHeader(UDPPacket packet, byte[] key1, byte[] key2) Session Request and Session Created only.static SSU2Header.HeaderSSU2Header.trialDecryptLongHeader(UDPPacket packet, byte[] key1, byte[] key2) Retry, Token Request, Peer Test only.static SSU2Header.HeaderSSU2Header.trialDecryptShortHeader(UDPPacket packet, byte[] key1, byte[] key2) Session Confirmed and data phase.Constructors in net.i2p.router.transport.udp with parameters of type UDPPacketModifierConstructorDescriptionInboundEstablishState2(RouterContext ctx, UDPTransport transport, UDPPacket packet) Start a new handshake with the given incoming packet, which must be a Session Request or Token Request.