2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
6 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_EXTENSION_H_
7 #define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_EXTENSION_H_
10 * IRT Extension describes an additional set of interfaces that can optionally
11 * be supplied which standard libraries (such as the C Standard Library) may
12 * use. These interfaces would be used along side the standard set of interfaces
13 * inside of irt.h and irt_dev.h. Some extra interfaces will be declared in this
14 * header (irt_extension.h) as well which standard libraries may accept and use.
16 * The IRT will not actually itself supply any function definitions for any of
17 * these interfaces, but the header will serve as a standard list of declared
18 * interfaces that standard libraries expect to use.
20 * A standard library that wishes to utilize interfaces supplied should
21 * implement nacl_interface_ext_supply() and is free to decide what it wants
22 * to do with supplied interfaces.
25 #if defined(__cplusplus)
30 * This function is used to supply extra interfaces to a standard library.
31 * An interface user such as a Standard libraries will implement this function.
33 * This function returns the number of bytes of TABLE used by the interface
34 * user. The number of bytes used will never be larger than TABLESIZE, and
35 * will return 0 if the interface was not used at all.
37 size_t nacl_interface_ext_supply(const char *interface_ident,
38 const void *table, size_t tablesize);
40 #if defined(__cplusplus)
44 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_EXTENSION_H */