.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.48) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "SSL_GET_PEER_ADDR 3ossl" .TH SSL_GET_PEER_ADDR 3ossl 2026-09-29 4.0.3 OpenSSL .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME SSL_get_peer_addr \- obtain the peer address of a QUIC connection .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& #include \& \& int SSL_get_peer_addr(SSL *ssl, BIO_ADDR *peer_addr); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBSSL_get_peer_addr()\fR retrieves the peer address of a QUIC connection and stores it into the \fBBIO_ADDR\fR structure pointed to by \fIpeer_addr\fR. The caller must supply a valid \fBBIO_ADDR\fR object which will be filled in on success. .PP This function is only meaningful when called on an SSL object which represents a QUIC connection or stream. It is not valid for non\-QUIC SSL objects. .SH NOTES .IX Header "NOTES" The peer address identifies the remote endpoint of a QUIC connection. For UDP sockets used by QUIC, the kernel does not maintain a connected peer in the same sense as for TCP. Instead, the peer address is tracked in the QUIC connection state. \fBSSL_get_peer_addr()\fR provides a way to obtain this address information from OpenSSL. .PP The \fBBIO_ADDR\fR type is an OpenSSL abstraction which can represent both IPv4 and IPv6 socket addresses. Applications can get the address family via the \fBBIO_ADDR\fR\|(3) API. .SH "RETURN VALUES" .IX Header "RETURN VALUES" \&\fBSSL_get_peer_addr()\fR returns 1 on success. On failure, or if called on an SSL object which is not a QUIC SSL object, 0 is returned and \fIpeer_addr\fR is left unchanged. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBSSL_accept_connection\fR\|(3), \fBSSL_accept_stream\fR\|(3), \fBBIO_ADDR\fR\|(3) .SH HISTORY .IX Header "HISTORY" This function was added in OpenSSL 4.0. .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2025 The OpenSSL Project Authors. All Rights Reserved. .PP Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at .