1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | SSL_inject_net_dgram - inject a datagram as though received from the network
|
---|
6 |
|
---|
7 | =head1 SYNOPSIS
|
---|
8 |
|
---|
9 | #include <openssl/ssl.h>
|
---|
10 |
|
---|
11 | int SSL_inject_net_dgram(SSL *s, const unsigned char *buf,
|
---|
12 | size_t buf_len,
|
---|
13 | const BIO_ADDR *peer,
|
---|
14 | const BIO_ADDR *local);
|
---|
15 |
|
---|
16 | =head1 DESCRIPTION
|
---|
17 |
|
---|
18 | This function can be used to inject a datagram payload to a QUIC connection SSL
|
---|
19 | object. The payload is processed as though it was received from the network.
|
---|
20 | This function can be used for debugging purposes or to allow datagrams to be fed
|
---|
21 | to QUIC from alternative sources.
|
---|
22 |
|
---|
23 | I<buf> is required and must point to a datagram payload to inject. I<buf_len> is
|
---|
24 | the length of the buffer in bytes. The buffer is copied and need not remain
|
---|
25 | valid after this function returns.
|
---|
26 |
|
---|
27 | I<peer> and I<local> are optional values pointing to B<BIO_ADDR> structures
|
---|
28 | describing the remote and local UDP endpoint addresses for the packet. Though
|
---|
29 | the injected packet was not actually received from the network directly by
|
---|
30 | OpenSSL, the packet will be processed as though the received datagram had the
|
---|
31 | given addresses.
|
---|
32 |
|
---|
33 | =head1 RETURN VALUES
|
---|
34 |
|
---|
35 | Returns 1 on success or 0 on failure. This function always fails if called
|
---|
36 | on a SSL object which is not a QUIC connection SSL object.
|
---|
37 |
|
---|
38 | =head1 SEE ALSO
|
---|
39 |
|
---|
40 | L<OSSL_QUIC_client_method(3)>, L<SSL_handle_events(3)>, L<SSL_set_blocking_mode(3)>
|
---|
41 |
|
---|
42 | =head1 HISTORY
|
---|
43 |
|
---|
44 | The function SSL_inject_net_dgram() was added in OpenSSL 3.2.
|
---|
45 |
|
---|
46 | =head1 COPYRIGHT
|
---|
47 |
|
---|
48 | Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
|
---|
49 |
|
---|
50 | Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
51 | this file except in compliance with the License. You can obtain a copy
|
---|
52 | in the file LICENSE in the source distribution or at
|
---|
53 | L<https://www.openssl.org/source/license.html>.
|
---|
54 |
|
---|
55 | =cut
|
---|