Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support use of net.PacketConn in dtls.Listener #570

Merged
merged 11 commits into from
Aug 27, 2023

Commits on Aug 27, 2023

  1. Introduce net package

    Introduces a new net package, which defines networking interfaces used
    throughout the pion/dtls code base, as well as utilities to help
    consumers convert standard library net types into pion/dtls compatible
    ones.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    f9fa3e0 View commit details
    Browse the repository at this point in the history
  2. Consume net package in tests

    Updates unit and e2e tests to consume new utilities from the dtls net
    package.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    76b3b1d View commit details
    Browse the repository at this point in the history
  3. Introduce net PacketBuffer

    Introduce a network PacketBuffer which maintains a ring buffer of
    network packets constituted of the packet payload and the remote address
    from which it was received. This package borrows heavily from the bytes
    based ring buffer in pion/transport/packetio.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    423f73a View commit details
    Browse the repository at this point in the history
  4. Add PacketBuffer unit tests

    Adds PacketBuffer unit tests.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    be76019 View commit details
    Browse the repository at this point in the history
  5. Introduce UDP net.PacketListener

    Introduces a UDP based net.PacketListener that allows for routing UDP
    datagrams based on remote address _or_ an alternate identifier. It is
    configured by the DatagramRouter and ConnectionIdentifier functions,
    which are provided by the caller. The former introspects outgoing
    datagrams for potential connection identifiers, while the latter routes
    incoming datagrams by introspecting their contents. This package borrows
    heavily from pion/transport/udp.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    b1c5035 View commit details
    Browse the repository at this point in the history
  6. Add UDP net.PacketListener unit tests

    Adds unit tests for UDP net.PacketListener.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    c884d97 View commit details
    Browse the repository at this point in the history
  7. Add CID based datagram routing

    Adds functions to route datagrams and identify connections by DTLS 1.2
    Connection IDs.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    2a05cdc View commit details
    Browse the repository at this point in the history
  8. Add CID routing unit tests

    Adds unit tests for CID routing functions.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    836b328 View commit details
    Browse the repository at this point in the history
  9. Set UDP routing if CID is enabled

    Sets UDP routing functions in the default DTLS listener if a connection
    ID generator is provided. Also updates to accept a dtls
    net.PacketListener when a caller wishes to provide their own.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    6ceaaa7 View commit details
    Browse the repository at this point in the history
  10. Add CID listener example

    Adds an example for setting up a CID-enabled DTLS listener.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    b6e9cfb View commit details
    Browse the repository at this point in the history
  11. Add CID send only client example

    Adds an example for a client that only sends connection IDs (i.e. does
    not request to received them). This is the most common scenario for DTLS
    clients.
    
    Signed-off-by: Daniel Mangum <[email protected]>
    hasheddan committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    29202df View commit details
    Browse the repository at this point in the history