## Uses of Class
net.i2p.router.transport.udp.UDPPacket

- Packages that use UDPPacket
  Package | Description
  --- | ---
  net.i2p.router.transport.udp | The UDP transport (also known as 'SSU' or Secure Semi-reliable UDP transport) for I2P, allowing I2P messages to be passed over UDP connections.

- - ### Uses of UDPPacket in net.i2p.router.transport.udp

    Methods in net.i2p.router.transport.udp that return UDPPacket
    Modifier and Type | Method and Description
    --- | ---
    `static UDPPacket` | UDPPacket.`acquire(RouterContext ctx, boolean inbound)` Acquires a UDPPacket instance, either from the cache or by creating a new instance.
    `UDPPacket` | PacketBuilder2.`buildACK(PeerState2 peer)` Build the ack packet.
    `UDPPacket` | PacketBuilder2.`buildHolePunch(InetAddress to, int port, SessionKey introKey, long sendID, long rcvID, byte[] signedData)` Out-of-session, containing a RelayResponse block.
    `UDPPacket` | PacketBuilder2.`buildPacket(List<PacketBuilder.Fragment> fragments, List<SSU2Payload.Block> otherBlocks, SSU2Sender peer)`
    `UDPPacket` | PacketBuilder2.`buildPacket(List<PacketBuilder.Fragment> fragments, PeerState2 peer)`
    `UDPPacket` | PacketBuilder2.`buildPacket(OutboundMessageState state, int fragment, PeerState2 peer)` This builds a data packet (PAYLOAD_TYPE_DATA).
    `UDPPacket` | PacketBuilder2.`buildPeerTestFromAlice(byte[] signedData, PeerState2 bob)` Build a packet as Alice, to Bob to begin a peer test.
    `UDPPacket` | PacketBuilder2.`buildPeerTestFromAlice(InetAddress toIP, int toPort, SessionKey introKey, long sendID, long rcvID, byte[] signedData)` Build a packet as Alice to Charlie.
    `UDPPacket` | PacketBuilder2.`buildPeerTestToAlice(InetAddress aliceIP, int alicePort, SessionKey introKey, boolean firstSend, long sendID, long rcvID, byte[] signedData)` Build a packet as Charlie to Alice.
    `UDPPacket` | 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.
    `UDPPacket` | 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.
    `UDPPacket` | PacketBuilder2.`buildPeerTestToBob(int code, byte[] signedData, PeerState2 bob)` Build a packet as Charlie to Bob verifying that we will help test Alice.
    `UDPPacket` | PacketBuilder2.`buildPeerTestToCharlie(Hash aliceHash, byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie)` Build a packet as Bob to Charlie to help test Alice.
    `UDPPacket` | PacketBuilder2.`buildPing(PeerState2 peer)` A DATA packet with padding only.
    `(package private) UDPPacket` | PacketBuilder2.`buildRelayIntro(byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie)` From Bob to Charlie.
    `(package private) UDPPacket` | PacketBuilder2.`buildRelayRequest(byte[] signedData, PeerState2 bob)` From Alice to Bob.
    `(package private) UDPPacket` | PacketBuilder2.`buildRelayResponse(byte[] signedData, PeerState2 state)` From Charlie to Bob or Bob to Alice.
    `UDPPacket` | PacketBuilder2.`buildRetryPacket(InboundEstablishState2 state, int terminationCode)` Build a new Retry packet for the given peer, encrypting it as necessary.
    `UDPPacket` | 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.
    `UDPPacket[]` | PacketBuilder2.`buildSessionConfirmedPackets(OutboundEstablishState2 state, RouterInfo ourInfo)` Build a new series of SessionConfirmed packets for the given peer, encrypting it as necessary.
    `UDPPacket` | PacketBuilder2.`buildSessionCreatedPacket(InboundEstablishState2 state)` Build a new SessionCreated packet for the given peer, encrypting it as necessary.
    `UDPPacket` | PacketBuilder2.`buildSessionDestroyPacket(int reason, SSU2Sender peer)` Build a data packet with a termination block.
    `UDPPacket` | PacketBuilder2.`buildSessionRequestPacket(OutboundEstablishState2 state)` Build a new SessionRequest packet for the given peer, encrypting it as necessary.
    `UDPPacket` | PacketBuilder2.`buildTokenRequestPacket(OutboundEstablishState2 state)` Build a new SessionRequest packet for the given peer, encrypting it as necessary.
    `UDPPacket` | InboundEstablishState2.`getRetransmitSessionCreatedPacket()`
    `UDPPacket` | OutboundEstablishState2.`getRetransmitSessionRequestPacket()`
    `UDPPacket` | UDPEndpoint.`receive()` Blocking call to receive the next inbound UDP packet from any peer.
    `UDPPacket` | 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 UDPPacket
    Modifier and Type | Method and Description
    --- | ---
    `List<UDPPacket>` | OutboundMessageFragments.`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 UDPPacket
    Modifier and Type | Method and Description
    --- | ---
    `static void` | SSU2Header.`acceptTrialDecrypt(UDPPacket packet, SSU2Header.Header header)` Copy the header back to the packet.
    `void` | UDPSender.`add(UDPPacket packet)` Adds a UDP packet to the send queue.
    `void` | UDPSender.`add(UDPPacket packet, int blockTime)` Deprecated. use `UDPSender.add(UDPPacket)` instead
    `PeerState2` | OutboundEstablishState2.`confirmedPacketsSent(UDPPacket[] packets)` note that we just sent the SessionConfirmed packets and save them for retransmission
    `static void` | SSU2Header.`encryptHandshakeHeader(UDPPacket packet, byte[] key1, byte[] key2)` First 64 bytes
    `static void` | SSU2Header.`encryptLongHeader(UDPPacket packet, byte[] key1, byte[] key2)` First 32 bytes
    `static void` | SSU2Header.`encryptShortHeader(UDPPacket packet, byte[] key1, byte[] key2)` First 16 bytes.
    `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` | PeerStateDestroyed.`receivePacket(RemoteHostId from, UDPPacket packet)`
    `(package private) void` | PeerState2.`receivePacket(RemoteHostId from, UDPPacket packet)` From different than expected source IP/port
    `(package private) void` | PeerStateDestroyed.`receivePacket(UDPPacket packet)`
    `(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.
    `PeerState2` | 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.`receiveSessionOrTokenRequestAfterRetry(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.
    `(package private) void` | UDPTransport.`send(UDPPacket packet)` This sends it directly out, bypassing OutboundMessageFragments.
    `void` | PacketPusher.`send(UDPPacket packet)` Sends a single UDP packet directly out by selecting an appropriate UDPEndpoint.
    `void` | UDPEndpoint.`send(UDPPacket packet)` Add the packet to the outobund queue to be sent ASAP (as allowed by the bandwidth limiter) BLOCKING if queue is full.
    `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.

    Constructors in net.i2p.router.transport.udp with parameters of type UDPPacket
    Constructor and Description
    `InboundEstablishState2(RouterContext ctx, UDPTransport transport, UDPPacket packet)` Start a new handshake with the given incoming packet, which must be a Session Request or Token Request.