SSL_set1_initial_peer_addr.pod 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. =pod
  2. =head1 NAME
  3. SSL_set1_initial_peer_addr - set the initial peer address for a QUIC connection
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_set1_initial_peer_addr(SSL *s, const BIO_ADDR *addr);
  7. =head1 DESCRIPTION
  8. SSL_set1_initial_peer_addr() sets the initial destination peer address to be used
  9. for the purposes of establishing a QUIC connection in client mode. This function
  10. can be used only on a QUIC connection SSL object, and can be used only before a
  11. connection attempt is first made. I<addr> must point to a B<BIO_ADDR>
  12. representing a UDP destination address of the server to connect to.
  13. Where a QUIC connection object is provided with a write BIO which supports the
  14. B<BIO_CTRL_DGRAM_GET_PEER> control (for example, B<BIO_s_dgram>), the initial
  15. destination peer address can be detected automatically; if
  16. B<BIO_CTRL_DGRAM_GET_PEER> returns a valid (non-B<AF_UNSPEC>) peer address and
  17. no valid peer address has yet been set, this will be set automatically as the
  18. initial peer address. This behaviour can be overridden by calling
  19. SSL_set1_initial_peer_addr() with a valid peer address explicitly.
  20. The destination address used by QUIC may change over time in response to
  21. connection events, such as connection migration (where supported).
  22. SSL_set1_initial_peer_addr() configures the destination address used for initial
  23. connection establishment, and does not confer any guarantee about the
  24. destination address being used for communication at any later time in the
  25. connection lifecycle.
  26. This function makes a copy of the address passed by the caller; the B<BIO_ADDR>
  27. structure pointed to by I<addr> may be freed by the caller after this function
  28. returns.
  29. =head1 RETURN VALUES
  30. Returns 1 on success and 0 on failure.
  31. =head1 SEE ALSO
  32. L<BIO_ADDR(3)>, L<ssl(7)>
  33. =head1 HISTORY
  34. The SSL_set1_initial_peer_addr() function was added in OpenSSL 3.2.
  35. =head1 COPYRIGHT
  36. Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
  37. Licensed under the Apache License 2.0 (the "License"). You may not use
  38. this file except in compliance with the License. You can obtain a copy
  39. in the file LICENSE in the source distribution or at
  40. L<https://www.openssl.org/source/license.html>.
  41. =cut