1=pod 2 3=head1 NAME 4 5OSSL_DISPATCH, OSSL_DISPATCH_END - OpenSSL Core type to define a dispatchable function table 6 7=head1 SYNOPSIS 8 9 #include <openssl/core.h> 10 11 typedef struct ossl_dispatch_st OSSL_DISPATCH; 12 struct ossl_dispatch_st { 13 int function_id; 14 void (*function)(void); 15 }; 16 17 #define OSSL_DISPATCH_END 18 19=head1 DESCRIPTION 20 21This type is a tuple of function identity and function pointer. 22Arrays of this type are passed between the OpenSSL libraries and the 23providers to describe what functionality one side provides to the other. 24 25Arrays of this type must be terminated with the OSSL_DISPATCH_END macro. 26 27=head2 B<OSSL_DISPATCH> fields 28 29=over 4 30 31=item I<function_id> 32 33OpenSSL defined function identity of the implemented function. 34 35=item I<function> 36 37Pointer to the implemented function itself. Despite the generic definition 38of this field, the implemented function it points to must have a function 39signature that corresponds to the I<function_id> 40 41=back 42 43Available function identities and corresponding function signatures are 44defined in L<openssl-core_dispatch.h(7)>. 45Furthermore, the chosen function identities and associated function 46signature must be chosen specifically for the operation that it's intended 47for, as determined by the intended L<OSSL_ALGORITHM(3)> array. 48 49Any function identity not recognised by the recipient of this type 50will be ignored. 51This ensures that providers built with one OpenSSL version in mind 52will work together with any other OpenSSL version that supports this 53mechanism. 54 55=begin comment RETURN VALUES doesn't make sense for a manual that only 56describes a type, but document checkers still want that section, and 57to have more than just the section title. 58 59=head1 RETURN VALUES 60 61txt 62 63=end comment 64 65=head1 SEE ALSO 66 67L<crypto(7)>, L<openssl-core_dispatch.h(7)>, L<OSSL_ALGORITHM(3)> 68 69=head1 HISTORY 70 71B<OSSL_DISPATCH> was added in OpenSSL 3.0. 72 73=head1 COPYRIGHT 74 75Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved. 76 77Licensed under the Apache License 2.0 (the "License"). You may not use 78this file except in compliance with the License. You can obtain a copy 79in the file LICENSE in the source distribution or at 80L<https://www.openssl.org/source/license.html>. 81 82=cut 83